Chore: Start harmonizing linting with plugin SDK (#25854)
* Chore: Harmonize linting with plugin SDK Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Chore: Fix linting issues Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
[run]
|
||||
timeout = "10m"
|
||||
|
||||
[linters-settings.golint]
|
||||
min-confidence = 3
|
||||
|
||||
[linters-settings.goconst]
|
||||
min-len = 5
|
||||
min-occurrences = 5
|
||||
|
||||
[linters]
|
||||
disable-all = true
|
||||
enable = [
|
||||
"bodyclose",
|
||||
"deadcode",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
# "gochecknoinits",
|
||||
"goconst",
|
||||
# "gocritic",
|
||||
"goimports",
|
||||
"golint",
|
||||
# "goprintffuncname",
|
||||
"gosec",
|
||||
"gosimple",
|
||||
"govet",
|
||||
"ineffassign",
|
||||
# "interfacer",
|
||||
# "misspell",
|
||||
"rowserrcheck",
|
||||
# "scopelint",
|
||||
"staticcheck",
|
||||
"structcheck",
|
||||
# "stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"varcheck",
|
||||
# "whitespace",
|
||||
]
|
||||
|
||||
# Disabled linters (might want them later)
|
||||
# "gocyclo",
|
||||
# "unparam"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G110"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G201"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G202"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G306"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "401"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "402"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "501"
|
||||
@@ -1,57 +0,0 @@
|
||||
run:
|
||||
timeout: 10m
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- gosec
|
||||
- vet
|
||||
- deadcode
|
||||
- gofmt
|
||||
- gosimple
|
||||
- ineffassign
|
||||
- structcheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unused
|
||||
- varcheck
|
||||
- goconst
|
||||
- staticcheck
|
||||
- errcheck
|
||||
|
||||
linters-settings:
|
||||
goconst:
|
||||
# minimal length of string constant, 3 by default
|
||||
min-len: 5
|
||||
# minimal occurrences count to trigger, 3 by default
|
||||
min-occurrences: 5
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- gosec
|
||||
text: G108
|
||||
- linters:
|
||||
- gosec
|
||||
text: G110
|
||||
- linters:
|
||||
- gosec
|
||||
text: G201
|
||||
- linters:
|
||||
- gosec
|
||||
text: G202
|
||||
- linters:
|
||||
- gosec
|
||||
text: G306
|
||||
- linters:
|
||||
- gosec
|
||||
text: G401
|
||||
- linters:
|
||||
- gosec
|
||||
text: G402
|
||||
- linters:
|
||||
- gosec
|
||||
text: G501
|
||||
- linters:
|
||||
- gosec
|
||||
text: G501
|
||||
@@ -0,0 +1,44 @@
|
||||
[run]
|
||||
timeout = "10m"
|
||||
|
||||
[linters-settings.golint]
|
||||
min-confidence = 3
|
||||
|
||||
[linters-settings.goconst]
|
||||
min-len = 5
|
||||
min-occurrences = 5
|
||||
|
||||
[linters]
|
||||
disable-all = true
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G110"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G201"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G202"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G306"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "401"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "402"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "501"
|
||||
@@ -1,39 +0,0 @@
|
||||
run:
|
||||
timeout: 10m
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
|
||||
linters-settings:
|
||||
goconst:
|
||||
# minimal length of string constant, 3 by default
|
||||
min-len: 5
|
||||
# minimal occurrences count to trigger, 3 by default
|
||||
min-occurrences: 5
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- gosec
|
||||
text: G108
|
||||
- linters:
|
||||
- gosec
|
||||
text: G110
|
||||
- linters:
|
||||
- gosec
|
||||
text: G201
|
||||
- linters:
|
||||
- gosec
|
||||
text: G202
|
||||
- linters:
|
||||
- gosec
|
||||
text: G306
|
||||
- linters:
|
||||
- gosec
|
||||
text: G401
|
||||
- linters:
|
||||
- gosec
|
||||
text: G402
|
||||
- linters:
|
||||
- gosec
|
||||
text: G501
|
||||
Reference in New Issue
Block a user