summaryrefslogtreecommitdiff
path: root/workhorse/_support/lint.sh
blob: b016f088d80c8848b26186111ad5a8bc2a08ae47 (plain)
1
2
3
4
5
6
7
8
9
10
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