Lint: lint and fix src/{os,reflect} (#4228)

* lint: expand to src/{os,reflect}, fix or suppress what it found

* internal/tools/tools.go: the tools idiom requires a build tag guard to avoid go test complaints
This commit is contained in:
dkegel-fastly
2024-04-22 11:10:13 -07:00
committed by GitHub
parent 1154212c15
commit 3d433fe9f1
7 changed files with 20 additions and 10 deletions
+5
View File
@@ -6,15 +6,19 @@ warningCode = 0
# Enable these as we fix them
[rule.blank-imports]
Exclude=["src/os/file_other.go"]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
Exclude=["**/*_test.go"]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
Exclude=["src/reflect/*.go"]
[rule.increment-decrement]
[rule.var-naming]
Exclude=["src/os/*.go"]
[rule.var-declaration]
#[rule.package-comments]
[rule.range]
@@ -27,4 +31,5 @@ warningCode = 0
[rule.superfluous-else]
#[rule.unused-parameter]
[rule.unreachable-code]
Exclude=["src/reflect/visiblefields_test.go", "src/reflect/all_test.go"]
#[rule.redefines-builtin-id]