mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
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:
@ -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"
|
||||
|
Reference in New Issue
Block a user