File tree 3 files changed +77
-73
lines changed 3 files changed +77
-73
lines changed Original file line number Diff line number Diff line change 1
1
name : Go Matrix
2
- on : [push, pull_request]
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
3
10
4
11
jobs :
5
12
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
pull_request :
8
+ branches :
9
+ - main
8
10
9
11
jobs :
10
12
13
15
runs-on : ubuntu-latest
14
16
env :
15
17
GO_VERSION : stable
16
- GOLANGCI_LINT_VERSION : v1.62.2
18
+ GOLANGCI_LINT_VERSION : v2.0.1
17
19
CGO_ENABLED : 0
18
20
19
21
steps :
30
32
31
33
# https://golangci-lint.run/usage/install#other-ci
32
34
- name : Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}
33
- run : curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master /install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
35
+ run : curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD /install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
34
36
35
37
- name : Make
36
38
run : make
Original file line number Diff line number Diff line change
1
+ version : " 2"
2
+
3
+ formatters :
4
+ enable :
5
+ - gci
6
+ - gofumpt
7
+ settings :
8
+ gofumpt :
9
+ extra-rules : true
10
+
1
11
linters :
2
- enable-all : true
12
+ default : all
3
13
disable :
4
- - exportloopref # deprecated
5
- - sqlclosecheck # not relevant (SQL)
6
- - rowserrcheck # not relevant (SQL)
7
14
- cyclop # duplicate of gocyclo
8
- - lll
9
15
- dupl
10
- - nlreturn
16
+ - errchkjson
11
17
- exhaustive
12
18
- exhaustruct
13
- - testpackage
14
- - tparallel
19
+ - lll
20
+ - nilnil
21
+ - nlreturn
22
+ - nonamedreturns
15
23
- paralleltest
16
24
- prealloc
25
+ - rowserrcheck # not relevant (SQL)
26
+ - sqlclosecheck # not relevant (SQL)
27
+ - testpackage
28
+ - tparallel
17
29
- varnamelen
18
- - nilnil
19
- - errchkjson
20
- - nonamedreturns
21
-
22
- linters-settings :
23
- govet :
24
- enable-all : true
25
- disable :
26
- - fieldalignment
27
- gocyclo :
28
- min-complexity : 20
29
- goconst :
30
- min-len : 5
31
- min-occurrences : 3
32
- misspell :
33
- locale : US
34
- funlen :
35
- lines : -1
36
- statements : 40
37
- godox :
38
- keywords :
39
- - FIXME
40
- gofumpt :
41
- extra-rules : true
42
- depguard :
43
- rules :
44
- main :
45
- deny :
46
- - pkg : " github.com/instana/testify"
47
- desc : not allowed
48
- - pkg : " github.com/pkg/errors"
49
- desc : Should be replaced by standard lib errors package
50
- wsl :
51
- force-case-trailing-whitespace : 1
52
- allow-trailing-comment : true
53
- gocritic :
54
- enabled-tags :
55
- - diagnostic
56
- - style
57
- - performance
58
- disabled-checks :
59
- - sloppyReassign
60
- - rangeValCopy
61
- - octalLiteral
62
- - paramTypeCombine # already handle by gofumpt.extra-rules
63
- settings :
64
- hugeParam :
65
- sizeThreshold : 100
66
- nolintlint :
67
- require-specific : true
68
- require-explanation : true
30
+ settings :
31
+ depguard :
32
+ rules :
33
+ main :
34
+ deny :
35
+ - pkg : github.com/instana/testify
36
+ desc : not allowed
37
+ - pkg : github.com/pkg/errors
38
+ desc : Should be replaced by standard lib errors package
39
+ funlen :
40
+ lines : -1
41
+ statements : 40
42
+ goconst :
43
+ min-len : 5
44
+ min-occurrences : 3
45
+ gocritic :
46
+ disabled-checks :
47
+ - sloppyReassign
48
+ - rangeValCopy
49
+ - octalLiteral
50
+ - paramTypeCombine # already handle by gofumpt.extra-rules
51
+ enabled-tags :
52
+ - diagnostic
53
+ - style
54
+ - performance
55
+ settings :
56
+ hugeParam :
57
+ sizeThreshold : 100
58
+ gocyclo :
59
+ min-complexity : 20
60
+ godox :
61
+ keywords :
62
+ - FIXME
63
+ govet :
64
+ disable :
65
+ - fieldalignment
66
+ enable-all : true
67
+ misspell :
68
+ locale : US
69
+ nolintlint :
70
+ require-explanation : true
71
+ require-specific : true
72
+ wsl :
73
+ force-case-trailing-whitespace : 1
74
+ allow-trailing-comment : true
69
75
70
76
issues :
71
- exclude-use-default : false
72
77
max-issues-per-linter : 0
73
78
max-same-issues : 0
74
-
75
- output :
76
- show-stats : true
77
- sort-results : true
78
- sort-order :
79
- - linter
80
- - file
81
-
82
- run :
83
- timeout : 5m
You can’t perform that action at this time.
0 commit comments