-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy path.golangci.yml
More file actions
82 lines (82 loc) · 2.55 KB
/
.golangci.yml
File metadata and controls
82 lines (82 loc) · 2.55 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
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
version: "2"
run:
tests: true
linters:
default: none
enable:
- errcheck
- govet
- ineffassign
- misspell
- revive
exclusions:
generated: lax
rules:
# revive: types and util are acceptable package names in this codebase
- linters:
- revive
paths:
- types/
- util/
text: 'var-naming: avoid meaningless package names'
# ignore govet false positive fixed in https://github.com/golang/go/issues/45043
- path: (.+)\.go$
text: 'sigchanyzer: misuse of unbuffered os.Signal channel as argument to signal.Notify'
# ignore golint false positive fixed in https://github.com/golang/lint/pull/487
- path: (.+)\.go$
text: exported method (.*).Unwrap` should have comment or be unexported
# ignore issues about the way we use _struct fields to define encoding settings
- path: (.+)\.go$
text: '`_struct` is unused'
# Enable some golangci-lint default exception rules:
# "EXC0001 errcheck: Almost all programs ignore errors on these functions and in most cases it's ok"
- path: (.+)\.go$
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# "EXC0005 staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore"
- path: (.+)\.go$
text: ineffective break statement. Did you mean to break out of the outer loop
# revive: ignore some rules
- path: (.+)\.go$
text: '^unused-parameter: parameter'
- path: (.+)\.go$
text: '^package-comments: should have a package comment'
paths:
- third_party$
- builtin$
- examples$
issues:
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
# use these new lint checks on code since #935
new-from-rev: 99ab66fdadcd77fef4048bb2aa86cae1f06c6e08
severity:
default: error
rules:
- linters:
- errcheck
- gci
- gofmt
- govet
- ineffassign
- misspell
- revive
severity: error
formatters:
enable:
- gci
- gofmt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/algorand)
- prefix(github.com/algorand/go-algorand)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$