.golangci.yml raw
1 run:
2 # timeout for analysis, e.g. 30s, 5m, default is 1m
3 deadline: 1m
4
5 # exit code when at least one issue was found, default is 1
6 issues-exit-code: 1
7
8 # include test files or not, default is true
9 tests: true
10
11 # all available settings of specific linters
12 linters-settings:
13 gocyclo:
14 min-complexity: 20
15 maligned:
16 suggest-new: true
17 dupl:
18 threshold: 100
19 goconst:
20 min-len: 3
21 min-occurrences: 2
22 depguard:
23 rules:
24 Main:
25 files:
26 - "!**/internal/**/*.go"
27 - "$all"
28 - "!$test"
29 allow:
30 - "$gostd"
31 - github.com/transip/gotransip/v6
32 - github.com/transip/gotransip/v6/rest
33 - github.com/transip/gotransip/v6/repository
34 - github.com/transip/gotransip/v6/vps
35 Internal:
36 files:
37 - "**/internal/**/*.go"
38 allow:
39 - "$gostd"
40 - github.com/transip/gotransip/v6
41 - github.com/transip/gotransip/v6/rest
42 - github.com/transip/gotransip/v6/repository
43 - github.com/transip/gotransip/v6/vps
44 - github.com/stretchr/testify/assert
45 - github.com/stretchr/testify/require
46 Tests:
47 files:
48 - "$test"
49 allow:
50 - "$gostd"
51 - github.com/transip/gotransip/v6
52 - github.com/transip/gotransip/v6/rest
53 - github.com/transip/gotransip/v6/repository
54 - github.com/transip/gotransip/v6/ipaddress
55 - github.com/transip/gotransip/v6/vps
56 - github.com/transip/gotransip/v6/jwt
57 - github.com/transip/gotransip/v6/internal/testutil
58 - github.com/stretchr/testify/require
59 - github.com/stretchr/testify/assert
60
61
62 lll:
63 line-length: 160
64 nakedret:
65 max-func-lines: 10
66
67
68 linters:
69 enable:
70 - asciicheck
71 - bidichk
72 - bodyclose
73 - contextcheck
74 - decorder
75 - depguard
76 - dogsled
77 - dupl
78 - durationcheck
79 - errcheck
80 - errchkjson
81 - errname
82 - errorlint
83 - exhaustive
84 - exportloopref
85 - forcetypeassert
86 - gocognit
87 - goconst
88 - gocritic
89 - gocyclo
90 - godox
91 - gofmt
92 - goheader
93 - gomoddirectives
94 - gomodguard
95 - goprintffuncname
96 - gosec
97 - gosimple
98 - govet
99 - grouper
100 - importas
101 - ineffassign
102 - lll
103 - maintidx
104 - makezero
105 - misspell
106 - nakedret
107 - nestif
108 - nilerr
109 - nilnil
110 - nolintlint
111 - prealloc
112 - predeclared
113 - revive
114 - rowserrcheck
115 - sqlclosecheck
116 - staticcheck
117 - stylecheck
118 - tenv
119 - typecheck
120 - unconvert
121 - unparam
122 - unused
123 - wastedassign
124 enable-all: false
125 disable-all: false
126 fast: false
127
128 issues:
129 exclude-rules:
130 # Exclude some linters from running on tests files.
131 - path: _test\.go
132 linters:
133 - dupl
134 - goconst
135 - ifshort
136 - lll
137 - path: jwt/token_test.go
138 linters:
139 - gosec
140 - path: mocks/*
141 linters:
142 - typecheck
143
144