Add linter script
[vaultmon/.git] / lint.sh
CommitLineData
14c71aeb
SB
1#!/bin/bash
2
3# Run golang-ci-lint https://github.com/golangci/golangci-lint
4
5[ ! -f $GOPATH/bin/golangci-lint ] && {
6 go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
7}
8
9golangci-lint run \
10 --enable=golint \
11 --enable=stylecheck \
12 --enable=gosec \
13 --enable=interfacer \
14 --enable=unconvert \
15 --enable=dupl \
16 --enable=goconst \
17 --enable=gocyclo \
18 --enable=gofmt \
19 --enable=goimports \
20 --enable=maligned \
21 --enable=depguard \
22 --enable=depguard \
23 --enable=misspell \
24 --enable=lll \
25 --enable=unparam \
26 --enable=nakedret \
27 --enable=prealloc \
28 --enable=scopelint \
29 --enable=gocritic \
30 --enable=gochecknoinits \
31 --enable=gochecknoinits \
32 --enable=gochecknoglobals