This repository was archived by the owner on May 24, 2023. It is now read-only.
File tree 3 files changed +27
-5
lines changed
3 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 29
29
- name : Checkout Repository
30
30
uses : actions/checkout@v2
31
31
- name : Lint Code
32
- uses : golangci/golangci-lint-action@v2.5.2
32
+ uses : golangci/golangci-lint-action@v2
33
33
with :
34
34
args : --timeout ${{ env.GOLANGCI_TIMEOUT }}
Original file line number Diff line number Diff line change @@ -4,13 +4,31 @@ linters-settings:
4
4
5
5
linters :
6
6
enable :
7
+ - asciicheck
8
+ - deadcode
9
+ - errcheck
10
+ - errorlint
11
+ - gofmt
12
+ - gofumpt
7
13
- goimports
14
+ - gosec
8
15
- gosimple
9
16
- govet
17
+ - ineffassign
18
+ - makezero
10
19
- misspell
11
- - gofmt
12
- - unparam
13
- - unconvert
20
+ - nilerr
21
+ - noctx
22
+ - predeclared
23
+ - staticcheck
14
24
- structcheck
15
- - errcheck
25
+ - typecheck
26
+ - unconvert
27
+ - unparam
28
+ - unused
29
+ - varcheck
30
+ - wastedassign
16
31
disable-all : true
32
+ issues :
33
+ max-issues-per-linter : 0
34
+ max-same-issues : 0
Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ fmt: ## Run go fmt against code.
85
85
vet : # # Run go vet against code.
86
86
go vet ./...
87
87
88
+ lint : # # Run golangci-lint against code.
89
+ docker run --pull always --rm -v $(shell pwd) :/nginx-ingress-operator -w /nginx-ingress-operator -v $(shell go env GOCACHE) :/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH) /pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run
90
+
91
+
88
92
ENVTEST_ASSETS_DIR =$(shell pwd) /testbin
89
93
test : manifests generate fmt vet # # Run tests.
90
94
mkdir -p ${ENVTEST_ASSETS_DIR}
You can’t perform that action at this time.
0 commit comments