Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/_support/lint.sh')
-rwxr-xr-xworkhorse/_support/lint.sh11
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
+