Skip to content

Commit 535d50b

Browse files
authored
Fix CI lint rules (#20)
1 parent daa6835 commit 535d50b

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

Diff for: .golangci.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- deadcode
5+
- goconst
6+
- gofmt
7+
- revive
8+
- gosimple
9+
- ineffassign
10+
- misspell
11+
- staticcheck
12+
- unconvert
13+
- varcheck
14+
- vet
15+
- vetshadow
16+
- errcheck
17+
- govet
18+
- structcheck
19+
- typecheck
20+
- gocritic
21+
22+
run:
23+
24+
# timeout for analysis
25+
timeout: 5m
26+
27+
skip-dirs:
28+
- hack
29+
30+
linters-settings:
31+
revive:
32+
rules:
33+
34+
# avoid errorf: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) messages
35+
- name: errorf
36+
disabled: true
37+
38+
gocritic:
39+
disabled-checks:
40+
- commentFormatting # we dont want to enforce space before the comment text
41+
42+
issues:
43+
44+
# List of regexps of issue texts to exclude
45+
exclude:
46+
- "comment on"
47+
- "error should be the last"
48+
49+
exclude-rules:
50+
51+
# list of excluded linters applied on test files
52+
- path: _test\.go
53+
linters:
54+
- goconst

0 commit comments

Comments
 (0)