Skip to content

Commit e1baef3

Browse files
committed
Use golangci-lint to match GH Actions; fix deadcode
1 parent 918ffc7 commit e1baef3

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,25 @@ build: $(SOURCES) ## Build Test
1111
go build -i -ldflags="-s -w" ./...
1212

1313
lint: ## Run golint
14-
@golint -set_exit_status $(addsuffix /... , $(SOURCE_DIRS))
14+
@golangci-lint run --disable-all \
15+
--deadline 5m \
16+
--enable=nakedret \
17+
--enable=interfacer \
18+
--enable=varcheck \
19+
--enable=deadcode \
20+
--enable=structcheck \
21+
--enable=misspell \
22+
--enable=maligned \
23+
--enable=ineffassign \
24+
--enable=goconst \
25+
--enable=goimports \
26+
--enable=errcheck \
27+
--enable=dupl \
28+
--enable=unparam \
29+
--enable=golint \
30+
--enable=staticcheck \
31+
--enable=unused \
32+
--enable=gosimple \
1533

1634
fmt: ## Run go fmt
1735
@gofmt -d $(SOURCES)

leader/leader.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ import (
3434
type runModeType string
3535

3636
const (
37-
localRunMode runModeType = "local"
38-
clusterRunMode runModeType = "cluster"
37+
localRunMode runModeType = "local"
3938
)
4039

4140
// forceRunModeEnv indicates if the operator should be forced to run in either local

0 commit comments

Comments
 (0)