-
Notifications
You must be signed in to change notification settings - Fork 27
/
.golangci.yml
59 lines (59 loc) · 2.07 KB
/
.golangci.yml
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
linters:
enable-all: true
disable:
- golint # deprecated
- interfacer # deprecated
- scopelint # deprecated
- nosnakecase # deprecated
- varcheck # deprecated
- structcheck # deprecated
- deadcode # deprecated
- gocognit # detects complex functions
- maligned # checks if structs can be reordered for more efficient packing
- rowserrcheck # checks if errors in DB queries are checked
- funlen # detects long functions
- depguard # checks imports against an allow-list
- goerr113 # forbids dynamic errors like ad-hoc wrapping with fmt.Errorf
- exhaustivestruct # requires struct initializations to contain all fields
- testpackage # requires tests to be in a separate package
- gochecknoglobals # forbids global variables
- wrapcheck # requires errors from external packages to be wrapped
- paralleltest # requires all test cases to run t.Parallel()
- forbidigo # forbids Println/Printf as it is likely used for debugging
- ifshort # requires expressions to be pulled into if statements if the result is only used there
- execinquery # checks SQL queries
- exhaustruct # checks if all structure fields are initialized
- nonamedreturns # forbids named returns
- gomnd # forbids magic numbers
- ireturn # forbids returning interfaces
- varnamelen # enforces long variable names for large variable scopes
- gci # seems to be buggy right now
- gofumpt # seems to be buggy right now
linters-settings:
godox:
keywords:
- FIXME # FIXME generates a linter warning
goconst:
min-occurrences: 5
cyclop:
# calm down a bit
max-complexity: 15
tagliatelle:
# check the struck tag name case
case:
rules:
json: snake
yaml: snake
gomnd:
settings:
mnd:
ignored-numbers: 0o400,0o600,0o660,0o640,0o644,0o700,0o750
ignored-functions: os.WriteFile,os.MkdirAll
exhaustive:
default-signifies-exhaustive: true
gosec:
excludes:
- G304 # command execution
- G204 # file inclusion
issues:
exclude-use-default: false