-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
111 lines (93 loc) · 3.14 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
linters-settings:
govet:
check-shadowing: true
settings:
printf:
funcs:
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).Tracef
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).Debugf
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).InfoF
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).Warnf
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).Critf
- (*git.ferricyanide.solutions/A_D/goGoGameBot/pkg/log.Logger).Panicf
gocognit:
min-complexity: 20
maligned:
suggest-new: true
misspell:
locale: GB
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
linters:
disable-all: true
enable:
- megacheck
- deadcode
- dogsled
- dupl
- errcheck
- gocognit
- goconst
- gocritic
- gocyclo
- gosec
- govet
- golint
- gofmt
- ineffassign
- lll
# - maligned -- On second thought, perhaps
- nakedret
- scopelint
- structcheck
- typecheck
- unconvert
- unparam
- varcheck
- whitespace
- wsl
- misspell
- funlen
- bodyclose
- goprintffuncname
- interfacer
- nakedret
# - godox
# TODO: - goerr113 For now, no, add this later
- nestif
- nolintlint
run:
max-issues-per-linter: 0
skip-dirs:
- internal/transport/network
skip-dirs-use-default: true
issues:
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# Unmarshal XML and JSON are obvious in what they do. Lets not.
- exported method `.+\.Unmarshal(?:XML|JSON)` should have comment or be unexported
# golint: Annoying issue about not having a comment. The rare codebase has such comments
# - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
# golint: False positive when tests are defined in package 'test'
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
# govet: Common false positives
- (possible misuse of unsafe.Pointer|should have signature)
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
# - ineffective break statement. Did you mean to break out of the outer loop
# gosec: Too many false-positives on 'unsafe' usage
- Use of unsafe calls should be audited
# gosec: Too many false-positives for parametrized shell calls
- Subprocess launch(ed with variable|ing should be audited)
# gosec: Duplicated errcheck checks
- G104
# gosec: Too many issues in popular repos
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable