forked from google/osv-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
76 lines (74 loc) · 2.27 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
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)
- exhaustruct # overkill (g-rath)
- forcetypeassert # too hard (g-rath)
- 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)
- mnd # 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)
- err113 # 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
- name: indent-error-flow
disabled: false
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:
- dupl