-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.golangci.yaml
93 lines (87 loc) · 2.37 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
87
88
89
90
91
92
93
run:
timeout: 5m
linters:
enable-all: true
disable:
# deprecations:
- gomnd # (since v1.58.0) in favor of 'mnd'
- execinquery # (since v1.58.0) as it has been archived
# we don't want that many whitespaces and white lines
- wsl
- nlreturn
# annoying linters that report many false positives
- depguard
- wrapcheck
- nilnil
- gochecknoinits
- nakedret
# other
- varnamelen # we want freedom for choosing variable names
- tagliatelle # we want freedom for choosing json mapping depending on requirements (external services, etc)
- lll # we try (not force) to keep the lines at a reasonable length
- exhaustruct # why? isn't it against Go idiomatic zero-value behave?
- nonamedreturns # we are fine with named returns so far
- musttag # sometimes we are just fine with defaults
- containedctx # for now, we are fine with context being passed around
- stylecheck # it is annoying, and sometimes ugly to have to write certain things capitalized
# perhaps revisit?
- cyclop
- funlen
- gocognit
# enable when on Go v1.22
- copyloopvar
- intrange
linters-settings:
revive:
rules:
- name: var-naming
disabled: true
gci:
sections:
- standard
- default
- prefix(github.com/BountySecurity/gbounty)
# Skip generated files.
skip-generated: false
# Make the section order the same as the order of `sections`.
custom-order: true
issues:
max-issues-per-linter: 1000
max-same-issues: 1000
exclude-rules:
# It's fine to disable some of the linters
# for test files.
- path: .*_test\.go
linters:
- dupl # false positives
- perfsprint # performance doesn't matter in tests
- path: profile/profilefakes/.*\.go
linters:
- dupl
- path: profile/request.go
linters:
- dupl
- path: profile/response.go
linters:
- dupl
- path: platform/http/client/reader.go
linters:
- mnd
- path: kit/osext/.*\.go
linters:
- mnd
- path: platform/filesystem/.*\.go
linters:
- dupl
- mnd
- path: internal/platform/writer/.*\.go
linters:
- dupl
- nestif
- mnd
- path: kit/slices/slices.go
linters:
- ireturn
- path: cmd/gbounty/bootstrap/bootstrap.go
linters:
- nestif