Skip to content

Commit

Permalink
feat: add deadcode linter in golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Trivedi <[email protected]>
  • Loading branch information
kushthedude committed Sep 1, 2020
1 parent dc53daa commit a073729
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
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

0 comments on commit a073729

Please sign in to comment.