File tree Expand file tree Collapse file tree 4 files changed +62
-44
lines changed Expand file tree Collapse file tree 4 files changed +62
-44
lines changed Original file line number Diff line number Diff line change 18
18
- uses : actions/checkout@v4
19
19
- run : make test
20
20
lint :
21
+ name : lint
21
22
runs-on : ubuntu-latest
22
- container :
23
- image : ghcr.io/hairyhenderson/gomplate-ci-build:latest
24
23
steps :
25
24
- uses : actions/checkout@v4
26
- - run : make ci-lint
25
+ - uses : actions/setup-go@v5
26
+ with :
27
+ go-version-file : go.mod
28
+ - name : golangci-lint
29
+ uses : golangci/golangci-lint-action@v8
30
+ with :
31
+ version : latest
32
+ args : --verbose --max-same-issues=0 --max-issues-per-linter=0
Original file line number Diff line number Diff line change 1
- linters-settings :
2
- govet :
3
- enable-all : true
4
- gocyclo :
5
- min-complexity : 10
6
- gomoddirectives :
7
- replace-local : false
8
- replace-allow-list : []
9
- dupl :
10
- threshold : 100
11
- goconst :
12
- min-len : 2
13
- min-occurrences : 4
14
- ignore-tests : true
15
- lll :
16
- line-length : 140
17
- nolintlint :
18
- allow-unused : false # report any unused nolint directives
19
- require-explanation : false # don't require an explanation for nolint directives
20
- require-specific : false # don't require nolint directives to be specific about which linter is being skipped
21
-
1
+ version : " 2"
2
+ run :
3
+ concurrency : 8
22
4
linters :
23
- disable-all : true
5
+ default : none
24
6
enable :
25
7
- asciicheck
26
8
- bodyclose
@@ -35,18 +17,13 @@ linters:
35
17
- exhaustive
36
18
- fatcontext
37
19
- funlen
38
- - gci
39
20
- gochecknoglobals
40
21
- gochecknoinits
41
22
- gocognit
42
23
- goconst
43
24
- gocritic
44
25
- gocyclo
45
- # # - godox
46
- - gofmt
47
- - gofumpt
48
26
- goheader
49
- - goimports
50
27
- gomoddirectives
51
28
- gomodguard
52
29
- goprintffuncname
@@ -78,22 +55,58 @@ linters:
78
55
- sloglint
79
56
- spancheck
80
57
- sqlclosecheck
81
- - tenv
58
+ - staticcheck
82
59
- testifylint
83
60
- thelper
84
61
- tparallel
85
- - typecheck
86
62
- unconvert
87
63
- unparam
88
64
- unused
89
65
- usestdlibvars
90
66
- whitespace
91
67
- wsl
92
- # slower linters
93
- - gosimple
94
- - staticcheck
95
- - stylecheck
96
-
97
- run :
98
- concurrency : 8
99
- timeout : 10m
68
+ settings :
69
+ dupl :
70
+ threshold : 100
71
+ goconst :
72
+ min-len : 2
73
+ min-occurrences : 4
74
+ gocyclo :
75
+ min-complexity : 10
76
+ gomoddirectives :
77
+ replace-local : false
78
+ govet :
79
+ enable-all : true
80
+ lll :
81
+ line-length : 140
82
+ nolintlint :
83
+ require-explanation : false
84
+ require-specific : false
85
+ allow-unused : false
86
+ exclusions :
87
+ generated : lax
88
+ presets :
89
+ - comments
90
+ - common-false-positives
91
+ - legacy
92
+ - std-error-handling
93
+ rules :
94
+ - linters :
95
+ - goconst
96
+ path : (.+)_test\.go
97
+ paths :
98
+ - third_party$
99
+ - builtin$
100
+ - examples$
101
+ formatters :
102
+ enable :
103
+ - gci
104
+ - gofmt
105
+ - gofumpt
106
+ - goimports
107
+ exclusions :
108
+ generated : lax
109
+ paths :
110
+ - third_party$
111
+ - builtin$
112
+ - examples$
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ COPY --from=build /bin/${PKG_NAME}_${TARGETOS}-${TARGETARCH}${TARGETVARIANT} /${
40
40
41
41
ENTRYPOINT [ "/sagemcom_fast_exporter" ]
42
42
43
- FROM alpine:3.21 AS alpine
43
+ FROM alpine:3.22 AS alpine
44
44
45
45
ARG PKG_NAME
46
46
ARG VCS_REF
Original file line number Diff line number Diff line change 99
99
endif
100
100
101
101
lint :
102
- @golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0 --sort-results
102
+ @golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0
103
103
104
- ci-lint :
105
- @golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0 --sort-results --out-format=github-actions
104
+ ci-lint : lint
106
105
107
106
.PHONY : clean test build lint ci-lint
108
107
.DELETE_ON_ERROR :
You can’t perform that action at this time.
0 commit comments