-
Notifications
You must be signed in to change notification settings - Fork 479
/
.golangci-warnings.yml
66 lines (56 loc) · 2.34 KB
/
.golangci-warnings.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
run:
timeout: 5m
tests: true
linters:
disable-all: true
enable:
- gosec
- partitiontest
linters-settings:
gosec: # Go 1.22 makes G601 irrelevant
excludes: [G101, G103, G104, G107, G115, G202, G301, G302, G303, G304, G306, G307, G404, G601]
custom:
partitiontest:
path: cmd/partitiontest_linter/plugin.so
description: This custom linter checks files that end in '_test.go', specifically functions that start with 'Test' and have testing argument, for a line 'partitiontest.ParitionTest(<testing arg>)'
original-url: github.com/algorand/go-algorand/cmd/partitiontest_linter
severity:
default-severity: warning
issues:
# use these new lint checks on code since #2574
new-from-rev: eb019291beed556ec6ac1ceb4a15114ce4df0c57
# Disable default exclude rules listed in `golangci-lint run --help` (selectively re-enable some below)
exclude-use-default: false
# 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
exclude:
# ignore govet false positive fixed in https://github.com/golang/go/issues/45043
- "sigchanyzer: misuse of unbuffered os.Signal channel as argument to signal.Notify"
# ignore issues about the way we use _struct fields to define encoding settings
- "`_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"
- 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"
- ineffective break statement. Did you mean to break out of the outer loop
exclude-rules:
# be more lenient with test code
- path: _test\.go
linters:
- deadcode
- gosec
- structcheck
- varcheck
- unused
# Add all linters here -- Comment this block out for testing linters
- path: test/linttest/lintissues\.go
linters:
- deadcode
- structcheck
- varcheck
- unused
- path: crypto/secp256k1/secp256_test\.go
linters:
- partitiontest