diff options
Diffstat (limited to 'workhorse/_support/lint.sh')
-rwxr-xr-x | workhorse/_support/lint.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/workhorse/_support/lint.sh b/workhorse/_support/lint.sh new file mode 100755 index 00000000000..b016f088d80 --- /dev/null +++ b/workhorse/_support/lint.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Unfortunately, workhorse fails many lint checks which we currently ignore +LINT_RESULT=$(golint "$@"|grep -Ev 'should have|should be|use ALL_CAPS in Go names') + +if [ -n "${LINT_RESULT}" ]; then + echo >&2 "Formatting or imports need fixing: 'make fmt'" + echo ">>${LINT_RESULT}<<" + exit 1 +fi + |