Run golint in ci

This commit is contained in:
kolaente 2020-10-11 21:07:15 +02:00
parent 73558cfab7
commit cd7003c17e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 3 additions and 17 deletions

View File

@ -83,16 +83,9 @@ steps:
depends_on: [ build ]
commands:
- ./mage-static build:generate
- ./mage-static check:lint
- ./mage-static check:fmt
- ./mage-static check:got-swag
- ./mage-static check:ineffassign
- ./mage-static check:misspell
- ./mage-static check:goconst
- ./mage-static check:gocyclo
- ./mage-static check:static
- wget -O - -q https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $GOPATH/bin v2.2.0 # Need to manually install as it does not support being installed via go modules like the rest.
- ./mage-static check:gosec
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
- ./mage-static check:golangci
when:
event: [ push, tag, pull_request ]

View File

@ -457,15 +457,8 @@ func (Check) GolangciFix() {
func (Check) All() {
mg.Deps(initVars)
mg.Deps(
Check.Fmt,
Check.Lint,
Check.Golangci,
Check.GotSwag,
Check.Misspell,
Check.Ineffassign,
Check.Gocyclo,
Check.Static,
Check.GoSec,
Check.Goconst,
)
}