2021-01-05 01:10:57 +03:00
|
|
|
run:
|
|
|
|
timeout: 10m
|
2021-03-25 15:10:16 +03:00
|
|
|
skip-dirs:
|
|
|
|
- go/vt/topo/k8stopo/client
|
2021-01-05 01:10:57 +03:00
|
|
|
|
|
|
|
linters-settings:
|
2021-04-29 05:17:53 +03:00
|
|
|
errcheck:
|
|
|
|
exclude: ./misc/errcheck_excludes.txt
|
2021-01-05 01:10:57 +03:00
|
|
|
goimports:
|
|
|
|
local-prefixes: vitess.io/vitess
|
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
# Defaults
|
|
|
|
- deadcode
|
2021-04-29 05:17:53 +03:00
|
|
|
- errcheck
|
2021-01-05 01:10:57 +03:00
|
|
|
- gosimple
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
|
|
|
- staticcheck
|
|
|
|
- structcheck
|
|
|
|
- typecheck
|
|
|
|
- varcheck
|
|
|
|
|
|
|
|
# Extras
|
|
|
|
- gofmt
|
|
|
|
- goimports
|
|
|
|
|
2021-01-14 05:18:28 +03:00
|
|
|
issues:
|
|
|
|
exclude-rules:
|
|
|
|
- path: '^go/vt/proto/'
|
|
|
|
linters:
|
2021-04-29 05:17:53 +03:00
|
|
|
- errcheck
|
2021-01-14 05:18:28 +03:00
|
|
|
- goimports
|
|
|
|
|
2021-04-29 05:17:53 +03:00
|
|
|
### BEGIN: errcheck exclusion rules. Each rule should be considered
|
|
|
|
# a TODO for removal after adding error checks to that package/file/etc,
|
|
|
|
# except where otherwise noted.
|
2021-05-30 03:01:55 +03:00
|
|
|
- path: '^go/cmd/(vtcombo|vtgateclienttest|vtorc)/'
|
2021-04-29 05:17:53 +03:00
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/mysql/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/pools/.*_test.go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/sqltypes/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/stats/statsd/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/test/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/automation/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/mysqlctl/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
# (NB: @ajm188) Technically, the below `exclude-rules` for `go/vt/orchestrator/external` is
|
|
|
|
# redundant with this line, but we actually want to permanently ignore orchestrator's
|
|
|
|
# vendored code, so we are keeping the exclusion rules separate because this one
|
|
|
|
# should be temporary while the latter should be permanent.
|
|
|
|
- path: '^go/vt/orchestrator/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
# This subtree should be permanently excluded, as it's vendored code.
|
|
|
|
- path: '^go/vt/orchestrator/external/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/schemamanager/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/servenv/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
# This code is autogenerated and should be permanently excluded.
|
|
|
|
- path: '^go/vt/sqlparser/goyacc'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/throttler/.*_test.go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/topo/.*/*._test.go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtcombo/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtctl/[^/]*.go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtctl/grpcvtctlclient/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtctl/grpcvtctlserver/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtctld/(schema|.*_test).go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtexplain/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vtgate/.*_test.go'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2021-08-26 22:52:42 +03:00
|
|
|
- path: '^go/vt/vtgr/'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2021-05-30 03:01:55 +03:00
|
|
|
- path: '^go/vt/vttablet/(customrule|filelogger|grpctmserver|onlineddl|sandboxconn|tabletserver)/'
|
2021-04-29 05:17:53 +03:00
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vttablet/tabletmanager/vreplication'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vttablet/(.*endtoend.*|.*_test.go)'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/vttest'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/worker'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/workflow'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/wrangler'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
- path: '^go/vt/zkctl'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
### END: errcheck exclusion rules
|
|
|
|
|
2021-01-05 01:10:57 +03:00
|
|
|
# https://github.com/golangci/golangci/wiki/Configuration
|
|
|
|
service:
|
2021-10-22 16:45:25 +03:00
|
|
|
golangci-lint-version: 1.42.1 # use the fixed version to not introduce new linters unexpectedly
|