Skip to content

Commit fbcbcc7

Browse files
authored
Merge pull request #4804 from sbueringer/pr-cleanup-golangci-yml
🌱 deduplicate linters, move exclude to exclude-rules
2 parents 0987bf1 + 1d07d6a commit fbcbcc7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.golangci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ linters:
66
- deadcode
77
- depguard
88
- dogsled
9-
- exportloopref
109
- errcheck
1110
- exportloopref
1211
- goconst
@@ -19,8 +18,8 @@ linters:
1918
- gosec
2019
- gosimple
2120
- govet
22-
- importas
2321
- ifshort
22+
- importas
2423
- ineffassign
2524
- misspell
2625
- nakedret
@@ -72,15 +71,21 @@ issues:
7271
exclude-use-default: false
7372
# List of regexps of issue texts to exclude, empty list by default.
7473
exclude:
75-
- "G108: Profiling endpoint is automatically exposed on /debug/pprof"
76-
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
77-
- "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"
7874
# The following are being worked on to remove their exclusion. This list should be reduced or go away all together over time.
7975
# If it is decided they will not be addressed they should be moved above this comment.
8076
- Subprocess launch(ed with variable|ing should be audited)
8177
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
8278
- (G104|G307)
8379
exclude-rules:
80+
- linters:
81+
- gosec
82+
text: "G108: Profiling endpoint is automatically exposed on /debug/pprof"
83+
- linters:
84+
- revive
85+
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"
86+
- linters:
87+
- errcheck
88+
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
8489
# With Go 1.16, the new embed directive can be used with an un-named import,
8590
# revive (previously, golint) only allows these to be imported in a main.go, which wouldn't work for us.
8691
# This directive allows the embed package to be imported with an underscore everywhere.

0 commit comments

Comments
 (0)