-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.golangci.yaml
More file actions
56 lines (51 loc) · 2.06 KB
/
.golangci.yaml
File metadata and controls
56 lines (51 loc) · 2.06 KB
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
version: "2"
linters:
default: all
exclusions:
paths:
- internal/compress/flate
- internal/compress/internal
disable:
- dupword # extremely normal in tests and a pretty unnecessary linter
- dupl # i know when i'm duplicating things and it's almost always for a good reason
- ireturn # can't seem to ignore this linter properly and we don't need anyway, cf. tagged unions
- goconst # unnecessary especially for our parsing code; many false positives
- mnd # unnecessary especially for our parsing code; many false positives
- lll # common sense is much better than these sort of rules
- gosmopolitan # completely normal to have CJK and such in tests
- nonamedreturns # named returns are often good for clarity
- wsl # outdated, use wsl_v5 instead
- varnamelen # it's rather reasonable to have counters like i, even when it spans quite a bit
- gocyclo # cyclomatic metrics aren't that good
- cyclop # cyclomatic metrics aren't that good
- godox # TODO/etc comments are allowed in our codebase
- funlen # long functions are fine
- wrapcheck # rules around interface-return methods are a bit silly
- dogsled # definitely not an issue, ignoring returns is normal
- exhaustruct # tmp: should fix... but too annoying at the moment
- err113 # tmp: will enable when we properly use defined errors
- gocognit # tmp: should consider sometime
settings:
perfsprint:
errorf: false
depguard:
rules:
Main:
list-mode: strict
files:
- $all
allow:
- $gostd
- codeberg.org/lindenii/furgit
- golang.org/x
gosec:
excludes:
- G301 # UNIX permissions
- G306 # UNIX permissions
revive:
rules:
- name: error-strings
disabled: true
issues:
max-issues-per-linter: 0
max-same-issues: 0