Skip to content
Permalink
Browse files

Add lefthook

  • Loading branch information...
DarthSim committed Aug 20, 2019
1 parent 337bb38 commit 749924b2bdc69ba151a6d66decde73e25752c75b
Showing with 29 additions and 0 deletions.
  1. +10 −0 .lefthook/pre-commit/lint
  2. +10 −0 .lefthook/pre-push/test
  3. +9 −0 lefthook.yml
@@ -0,0 +1,10 @@
#!/bin/sh

if ! [ -x "$(which brew)" ]; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libffi)/lib/pkgconfig"
fi

export CGO_LDFLAGS_ALLOW="-s|-w"
export CGO_CFLAGS_ALLOW="-Xpreprocessor"

golangci-lint run
@@ -0,0 +1,10 @@
#!/bin/sh

if ! [ -x "$(which brew)" ]; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libffi)/lib/pkgconfig"
fi

export CGO_LDFLAGS_ALLOW="-s|-w"
export CGO_CFLAGS_ALLOW="-Xpreprocessor"

go test
@@ -0,0 +1,9 @@
pre-commit:
scripts:
lint:
tags: lint

pre-push:
scripts:
test:
tags: test

0 comments on commit 749924b

Please sign in to comment.
You can’t perform that action at this time.