Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866)

* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Arve Knudsen
2020-11-05 15:37:11 +01:00
committed by GitHub
parent 135b83e17f
commit 676d393ec9
27 changed files with 193 additions and 182 deletions

View File

@ -32,7 +32,7 @@ enable = [
"exportloopref",
"staticcheck",
"structcheck",
# "stylecheck",
"stylecheck",
"typecheck",
"unconvert",
"unused",
@ -44,6 +44,18 @@ enable = [
# Disabled linters (might want them later)
# "unparam"
# Enable when appropriate
# Poorly chosen identifier
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1003"
# Enable when appropriate
# Dot imports that aren't in external test packages are discouraged.
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1001"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G108"