1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2026-05-16 09:18:09 +02:00
Files
imgproxy/.lefthook/pre-commit/lint
T
2019-09-16 15:53:32 +06:00

16 lines
323 B
Bash
Executable File

#!/bin/sh
if ! git diff --staged --name-only | grep -qe ".*\.go$"; then
echo "Nothing to lint"
exit 0;
fi
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