Run golint in ci
This commit is contained in:
parent
73558cfab7
commit
cd7003c17e
11
.drone1.yml
11
.drone1.yml
|
@ -83,16 +83,9 @@ steps:
|
||||||
depends_on: [ build ]
|
depends_on: [ build ]
|
||||||
commands:
|
commands:
|
||||||
- ./mage-static build:generate
|
- ./mage-static build:generate
|
||||||
- ./mage-static check:lint
|
|
||||||
- ./mage-static check:fmt
|
|
||||||
- ./mage-static check:got-swag
|
- ./mage-static check:got-swag
|
||||||
- ./mage-static check:ineffassign
|
- 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:misspell
|
- ./mage-static check:golangci
|
||||||
- ./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
|
|
||||||
when:
|
when:
|
||||||
event: [ push, tag, pull_request ]
|
event: [ push, tag, pull_request ]
|
||||||
|
|
||||||
|
|
|
@ -457,15 +457,8 @@ func (Check) GolangciFix() {
|
||||||
func (Check) All() {
|
func (Check) All() {
|
||||||
mg.Deps(initVars)
|
mg.Deps(initVars)
|
||||||
mg.Deps(
|
mg.Deps(
|
||||||
Check.Fmt,
|
Check.Golangci,
|
||||||
Check.Lint,
|
|
||||||
Check.GotSwag,
|
Check.GotSwag,
|
||||||
Check.Misspell,
|
|
||||||
Check.Ineffassign,
|
|
||||||
Check.Gocyclo,
|
|
||||||
Check.Static,
|
|
||||||
Check.GoSec,
|
|
||||||
Check.Goconst,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue