Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Drop duplicate pprof and unused linter excludes #9156

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading