Skip to content

Commit 7c9ac62

Browse files
authored
Merge pull request #171 from bootjp/feature/update-golangci-lint
Add .golangci.bck.yaml and update config file
2 parents 7bb6f63 + 1df602d commit 7c9ac62

File tree

2 files changed

+71
-16
lines changed

2 files changed

+71
-16
lines changed

.golangci.bck.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
run:
2+
concurrency: 4
3+
timeout: 10m
4+
5+
linters:
6+
enable:
7+
- cyclop
8+
- dupl
9+
- durationcheck
10+
- errorlint
11+
- exhaustive
12+
- copyloopvar
13+
- forcetypeassert
14+
- gocognit
15+
- goconst
16+
- gocritic
17+
- gocyclo
18+
- gofmt
19+
- mnd
20+
- gosec
21+
- makezero
22+
- nakedret
23+
- nestif
24+
- nilerr
25+
- noctx
26+
# - prealloc
27+
- unconvert
28+
- unparam
29+
- wastedassign
30+
- wrapcheck
31+
- gci
32+
33+
34+
issues:
35+
exclude-rules:
36+
- path: (.*)test(.*).go
37+
linters:
38+
- funlen
39+
- goconst
40+
- wrapcheck
41+
- dupl

.golangci.yaml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,55 @@
1+
version: "2"
12
run:
23
concurrency: 4
3-
timeout: 10m
4-
54
linters:
65
enable:
6+
- copyloopvar
77
- cyclop
88
- dupl
99
- durationcheck
1010
- errorlint
1111
- exhaustive
12-
- copyloopvar
1312
- forcetypeassert
1413
- gocognit
1514
- goconst
1615
- gocritic
1716
- gocyclo
18-
- gofmt
19-
- mnd
2017
- gosec
2118
- makezero
19+
- mnd
2220
- nakedret
2321
- nestif
2422
- nilerr
2523
- noctx
26-
# - prealloc
2724
- unconvert
2825
- unparam
2926
- wastedassign
3027
- wrapcheck
28+
exclusions:
29+
generated: lax
30+
presets:
31+
- comments
32+
- common-false-positives
33+
- legacy
34+
- std-error-handling
35+
rules:
36+
- linters:
37+
- dupl
38+
- funlen
39+
- goconst
40+
- wrapcheck
41+
path: (.*)test(.*).go
42+
paths:
43+
- third_party$
44+
- builtin$
45+
- examples$
46+
formatters:
47+
enable:
3148
- gci
32-
33-
34-
issues:
35-
exclude-rules:
36-
- path: (.*)test(.*).go
37-
linters:
38-
- funlen
39-
- goconst
40-
- wrapcheck
41-
- dupl
49+
- gofmt
50+
exclusions:
51+
generated: lax
52+
paths:
53+
- third_party$
54+
- builtin$
55+
- examples$

0 commit comments

Comments
 (0)