forked from google/osv-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
86 lines (84 loc) · 2.55 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
output:
sort-results: true
linters:
enable:
- gofmt
- goimports
# prettier-ignore
disable:
- tagliatelle # we're parsing data from external sources (g-rath)
- varnamelen # maybe later (g-rath)
- exhaustivestruct # deprecated
- exhaustruct # overkill (g-rath)
- forcetypeassert # too hard (g-rath)
- interfacer # deprecated
- golint # deprecated
- scopelint # deprecated
- maligned # deprecated
- varcheck # deprecated
- structcheck # deprecated
- deadcode # deprecated
- nosnakecase # deprecated
- lll # line length is hard (g-rath)
- godox # to-do comments are fine (g-rath)
- godot # comments are fine without full stops (g-rath)
- gomnd # not every number is magic (g-rath)
- wsl # disagree with, for now (g-rath)
- ireturn # disagree with, sort of (g-rath)
- gochecknoglobals # disagree with, for non changing variables (another-rex)
- wrapcheck # too difficult, will re-add later (another-rex)
- testpackage # will re-add later (another-rex)
- goerr113 # will re-add later (another-rex)
- nonamedreturns # disagree with, for now (another-rex)
- goconst # not everything should be a constant
presets:
- bugs
- comment
- error
- performance
- sql
- style
- test
- unused
linters-settings:
govet:
settings:
printf:
funcs:
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Errorf
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Warnf
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Verbosef
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Infof
depguard:
rules:
regexp:
files:
- "!**/internal/cachedregexp/**"
- "!**/main_test.go"
deny:
- pkg: "regexp"
desc: "Use github.com/google/osv-scanner/internal/cachedregexp instead"
gocritic:
disabled-checks:
- ifElseChain
revive:
rules:
- name: increment-decrement
disabled: true
nlreturn:
# Size of the block (including return statement that is still "OK")
# so no return split required.
# Default: 1
block-size: 2
issues:
exclude-rules:
- path: pkg/reporter
linters:
- dupl
- path: _test\.go
linters:
- goerr113
- dupl
- path: main.go
linters:
- gochecknoglobals