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

feat: add deadcode linter in golangci-lint #1446

Merged
merged 1 commit into from
Sep 1, 2020
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
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ linters:
- gofmt
- golint
- errcheck
- deadcode
# TODO(oxddr): enable more checkers
# - deadcode
# - misspell

service:
Expand Down
7 changes: 0 additions & 7 deletions compare/src/compare-resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,6 @@ func max(left, right int64) int64 {
return right
}

func min(left, right int64) int64 {
if left < right {
return left
}
return right
}

func getContainerKind(containerName string) string {
return containerName[strings.LastIndex(containerName, "/")+1:]
}
Expand Down
1 change: 0 additions & 1 deletion network/benchmarks/netperf/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
)

const (
debugLog = "output.txt"
testNamespace = "netperf"
csvDataMarker = "GENERATING CSV OUTPUT"
csvEndDataMarker = "END CSV DATA"
Expand Down
11 changes: 0 additions & 11 deletions perfdash/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ type Tests struct {
// Jobs is a map from job name to all supported tests in the job.
type Jobs map[string]Tests

// Buckets is a map from bucket url to all supported jobs in the bucket.
type Buckets map[string]Jobs

var (
// performanceDescriptions contains metrics exported by a --ginko.focus=[Feature:Performance]
// e2e test
Expand Down Expand Up @@ -367,14 +364,6 @@ var (
}
)

func getProwConfigOrDie(configPaths []string) Jobs {
jobs, err := getProwConfig(configPaths)
if err != nil {
panic(err)
}
return jobs
}

// Minimal subset of the prow config definition at k8s.io/test-infra/prow/config
type config struct {
Periodics []periodic `json:"periodics"`
Expand Down