Add linter script master
authorSofian Brabez <sbz@6dev.net>
Thu, 28 Feb 2019 15:58:29 +0000 (15:58 +0000)
committerSofian Brabez <sbz@6dev.net>
Thu, 28 Feb 2019 15:58:29 +0000 (15:58 +0000)
lint.sh [new file with mode: 0755]

diff --git a/lint.sh b/lint.sh
new file mode 100755 (executable)
index 0000000..cc53980
--- /dev/null
+++ b/lint.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Run golang-ci-lint https://github.com/golangci/golangci-lint
+
+[ ! -f $GOPATH/bin/golangci-lint ] && {
+    go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
+}
+
+golangci-lint run \
+    --enable=golint \
+    --enable=stylecheck \
+    --enable=gosec \
+    --enable=interfacer \
+    --enable=unconvert \
+    --enable=dupl \
+    --enable=goconst \
+    --enable=gocyclo \
+    --enable=gofmt \
+    --enable=goimports \
+    --enable=maligned \
+    --enable=depguard \
+    --enable=depguard \
+    --enable=misspell \
+    --enable=lll \
+    --enable=unparam \
+    --enable=nakedret \
+    --enable=prealloc \
+    --enable=scopelint \
+    --enable=gocritic \
+    --enable=gochecknoinits \
+    --enable=gochecknoinits \
+    --enable=gochecknoglobals