mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 11:42:35 -06:00
Moved gometalinter to a script instead of seperate commands in circleci file, removed megacheck and added staticcheck
This commit is contained in:
parent
d843044841
commit
d5e49845f3
@ -81,20 +81,9 @@ jobs:
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run: 'go get -u github.com/alecthomas/gometalinter'
|
||||
- run: 'go get -u github.com/tsenart/deadcode'
|
||||
- run: 'go get -u github.com/jgautheron/goconst/cmd/goconst'
|
||||
- run: 'go get -u github.com/gordonklaus/ineffassign'
|
||||
- run: 'go get -u honnef.co/go/tools/cmd/megacheck'
|
||||
- run: 'go get -u github.com/opennota/check/cmd/structcheck'
|
||||
- run: 'go get -u github.com/mdempsky/unconvert'
|
||||
- run: 'go get -u github.com/opennota/check/cmd/varcheck'
|
||||
- run:
|
||||
name: run linters
|
||||
command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=goconst --enable=gofmt --enable=ineffassign --enable=megacheck --enable=structcheck --enable=unconvert --enable=varcheck ./...'
|
||||
- run:
|
||||
name: run go vet
|
||||
command: 'go vet ./pkg/...'
|
||||
name: frontend tests
|
||||
command: './scripts/build/gometalinter.sh'
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
|
22
scripts/build/gometalinter.sh
Executable file
22
scripts/build/gometalinter.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
go get -u github.com/alecthomas/gometalinter
|
||||
go get -u github.com/tsenart/deadcode
|
||||
go get -u github.com/jgautheron/goconst/cmd/goconst
|
||||
go get -u github.com/gordonklaus/ineffassign
|
||||
go get -u github.com/opennota/check/cmd/structcheck
|
||||
go get -u github.com/mdempsky/unconvert
|
||||
go get -u github.com/opennota/check/cmd/varcheck
|
||||
go get -u honnef.co/go/tools/cmd/staticcheck
|
||||
|
||||
gometalinter --enable-gc --vendor --deadline 10m --disable-all \
|
||||
--enable=deadcode \
|
||||
--enable=goconst \
|
||||
--enable=gofmt \
|
||||
--enable=ineffassign \
|
||||
--enable=structcheck \
|
||||
--enable=unconvert \
|
||||
--enable=varcheck \
|
||||
--enable=staticcheck
|
||||
|
||||
go vet ./pkg/...
|
Loading…
Reference in New Issue
Block a user