File tree Expand file tree Collapse file tree 6 files changed +1047
-17
lines changed Expand file tree Collapse file tree 6 files changed +1047
-17
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ defaults:
17
17
shell : bash
18
18
19
19
env :
20
- GOLANGCI_VERSION : 1.38
21
20
GOLANGCI_TIMEOUT : 10m0s
22
21
23
22
jobs :
31
30
- name : Lint Code
32
31
33
32
with :
34
- version : ' v${{ env.GOLANGCI_VERSION }}'
35
33
args : --timeout ${{ env.GOLANGCI_TIMEOUT }} --issues-exit-code=0
Original file line number Diff line number Diff line change
1
+ linters-settings :
2
+ misspell :
3
+ locale : US
4
+
5
+ linters :
6
+ enable :
7
+ - goimports
8
+ - gosimple
9
+ - govet
10
+ - misspell
11
+ - gofmt
12
+ - unparam
13
+ - unconvert
14
+ - structcheck
15
+ - errcheck
16
+ disable-all : true
17
+
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ DOCKERFILEPATH = build
6
6
DOCKERFILE = Dockerfile
7
7
8
8
GIT_COMMIT = $(shell git rev-parse HEAD)
9
-
10
- GOLANGCI_CONTAINER =golangci/golangci-lint:v1.29-alpine
11
9
DATE = $(shell date -u +"% Y-% m-% dT% H:% M:% SZ")
12
10
13
11
export DOCKER_BUILDKIT = 1
@@ -18,10 +16,7 @@ nginx-prometheus-exporter:
18
16
19
17
.PHONY : lint
20
18
lint :
21
- docker run --rm \
22
- -v $(shell pwd) :/go/src/github.com/nginxinc/nginx-prometheus-exporter \
23
- -w /go/src/github.com/nginxinc/nginx-prometheus-exporter \
24
- $(GOLANGCI_CONTAINER ) golangci-lint run
19
+ go run github.com/golangci/golangci-lint/cmd/golangci-lint run
25
20
26
21
.PHONY : test
27
22
test :
@@ -35,6 +30,10 @@ container:
35
30
push : container
36
31
docker push $(PREFIX ) :$(TAG )
37
32
33
+ .PHONY : deps
34
+ deps :
35
+ @go mod tidy && go mod verify && go mod download
36
+
38
37
.PHONY : clean
39
38
clean :
40
39
-rm -r dist
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ module github.com/nginxinc/nginx-prometheus-exporter
3
3
go 1.16
4
4
5
5
require (
6
+ github.com/golangci/golangci-lint v1.39.0
6
7
github.com/nginxinc/nginx-plus-go-client v0.8.0
7
8
github.com/prometheus/client_golang v1.10.0
8
9
github.com/prometheus/common v0.20.0
9
- google.golang.org/protobuf v1.26.0 // indirect
10
10
)
You can’t perform that action at this time.
0 commit comments