Skip to content

Commit

Permalink
Drop duplicate pprof and unused linter excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Aug 9, 2023
1 parent 59b8c79 commit eaa43d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
26 changes: 12 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ linters-settings:
- wrapperFunc
- rangeValCopy
- hugeParam
gosec:
excludes:
- G307 # Deferring unsafe method "Close" on type "\*os.File"
- G108 # Profiling endpoint is automatically exposed on /debug/pprof
importas:
no-unaliased: true
alias:
Expand Down Expand Up @@ -264,14 +260,21 @@ issues:
text: always receives
# Dot imports for gomega and ginkgo are allowed
# within test files and test utils.
- path: _test\.go
- linters:
- revive
- stylecheck
path: _test\.go
text: should not use dot imports
- path: (framework|e2e)/.*.go
- linters:
- revive
- stylecheck
path: (framework|e2e)/.*.go
text: should not use dot imports
- path: util/defaulting/defaulting.go
- linters:
- revive
- stylecheck
path: util/defaulting/defaulting.go
text: should not use dot imports
- path: _test\.go
text: cyclomatic complexity
# Append should be able to assign to a different var/slice.
- linters:
- gocritic
Expand Down Expand Up @@ -313,11 +316,6 @@ issues:
- stylecheck
text: "ST1016: methods on the same type should have the same receiver name"
path: .*(api|types)\/.*\/conversion.*\.go$
# hack/tools
- linters:
- typecheck
text: import (".+") is a program, not an importable package
path: ^tools\.go$
# We don't care about defer in for loops in test files.
- linters:
- gocritic
Expand Down
1 change: 0 additions & 1 deletion bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
_ "net/http/pprof"
"os"
goruntime "runtime"
"time"
Expand Down
1 change: 0 additions & 1 deletion controlplane/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
_ "net/http/pprof"
"os"
goruntime "runtime"
"time"
Expand Down

0 comments on commit eaa43d4

Please sign in to comment.