mirror of
https://github.com/niusmallnan/steve.git
synced 2025-04-27 02:51:39 +00:00
Adds a validate phase to the CI which runs a linter. Also fixes linter issues discovered during the initial run
67 lines
1.6 KiB
JSON
67 lines
1.6 KiB
JSON
{
|
|
"linters": {
|
|
"disable-all": true,
|
|
"enable": [
|
|
"govet",
|
|
"revive",
|
|
"goimports",
|
|
"misspell",
|
|
"ineffassign",
|
|
"gofmt"
|
|
]
|
|
},
|
|
"linters-settings": {
|
|
"govet": {
|
|
"check-shadowing": false
|
|
},
|
|
"gofmt": {
|
|
"simplify": false
|
|
}
|
|
},
|
|
"run": {
|
|
"skip-dirs": [
|
|
"vendor",
|
|
"tests",
|
|
"pkg/client",
|
|
"pkg/generated"
|
|
],
|
|
"tests": false,
|
|
"timeout": "10m"
|
|
},
|
|
"issues": {
|
|
"exclude-rules": [
|
|
{
|
|
"linters": "govet",
|
|
"text": "^(nilness|structtag)"
|
|
},
|
|
{
|
|
"path":"pkg/apis/management.cattle.io/v3/globaldns_types.go",
|
|
"text":".*lobalDns.*"
|
|
},
|
|
{
|
|
"path": "pkg/apis/management.cattle.io/v3/zz_generated_register.go",
|
|
"text":".*lobalDns.*"
|
|
},
|
|
{
|
|
"path":"pkg/apis/management.cattle.io/v3/zz_generated_list_types.go",
|
|
"text":".*lobalDns.*"
|
|
},
|
|
{
|
|
"linters": "revive",
|
|
"text": "should have comment"
|
|
},
|
|
{
|
|
"linters": "revive",
|
|
"text": "should be of the form"
|
|
},
|
|
{
|
|
"linters": "revive",
|
|
"text": "by other packages, and that stutters"
|
|
},
|
|
{
|
|
"linters": "typecheck",
|
|
"text": "imported but not used as apierrors"
|
|
}
|
|
]
|
|
}
|
|
} |