Skip to content

Commit 03ab8cd

Browse files
authored
Merge pull request #9156 from chrischdi/pr-lint-pprof
🌱 Drop duplicate pprof and unused linter excludes
2 parents a4951b6 + eaa43d4 commit 03ab8cd

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

.golangci.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ linters-settings:
8888
- wrapperFunc
8989
- rangeValCopy
9090
- hugeParam
91-
gosec:
92-
excludes:
93-
- G307 # Deferring unsafe method "Close" on type "\*os.File"
94-
- G108 # Profiling endpoint is automatically exposed on /debug/pprof
9591
importas:
9692
no-unaliased: true
9793
alias:
@@ -264,14 +260,21 @@ issues:
264260
text: always receives
265261
# Dot imports for gomega and ginkgo are allowed
266262
# within test files and test utils.
267-
- path: _test\.go
263+
- linters:
264+
- revive
265+
- stylecheck
266+
path: _test\.go
268267
text: should not use dot imports
269-
- path: (framework|e2e)/.*.go
268+
- linters:
269+
- revive
270+
- stylecheck
271+
path: (framework|e2e)/.*.go
270272
text: should not use dot imports
271-
- path: util/defaulting/defaulting.go
273+
- linters:
274+
- revive
275+
- stylecheck
276+
path: util/defaulting/defaulting.go
272277
text: should not use dot imports
273-
- path: _test\.go
274-
text: cyclomatic complexity
275278
# Append should be able to assign to a different var/slice.
276279
- linters:
277280
- gocritic
@@ -313,11 +316,6 @@ issues:
313316
- stylecheck
314317
text: "ST1016: methods on the same type should have the same receiver name"
315318
path: .*(api|types)\/.*\/conversion.*\.go$
316-
# hack/tools
317-
- linters:
318-
- typecheck
319-
text: import (".+") is a program, not an importable package
320-
path: ^tools\.go$
321319
# We don't care about defer in for loops in test files.
322320
- linters:
323321
- gocritic

bootstrap/kubeadm/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
_ "net/http/pprof"
2524
"os"
2625
goruntime "runtime"
2726
"time"

controlplane/kubeadm/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
_ "net/http/pprof"
2524
"os"
2625
goruntime "runtime"
2726
"time"

0 commit comments

Comments
 (0)