-
Notifications
You must be signed in to change notification settings - Fork 116
/
.golangci.yml
65 lines (63 loc) · 3.17 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
linters-settings:
godox:
keywords: # default keywords are TODO, BUG, and FIXME, but we override this by ignoring TODO
- BUG
- FIXME
funlen:
lines: 150
statements: 80
cyclop:
# the minimal code complexity to report
max-complexity: 26
gocognit:
min-complexity: 45
issues:
exclude-use-default: false
exclude:
- Using the variable on range scope `tt` in function literal
- GetJsonSHA256Fingerprints should be GetJSONSHA256Fingerprints
- ST1003 # CamelCase variables; see constants/cipher.go
- missing output for example, go test can't validate it
- variable 'hasExpiredEntity' is only used in the if-statement
exclude-rules:
- path: crypto/key_clear.go
text: "SA1019"
- path: crypto/crypto_example_test.go
text: "G101: Potential hardcoded credentials"
- path: crypto/encrypt_decrypt_test.go
text: "Using the variable on range scope"
- path: crypto/encrypt_decrypt_err_test.go
text: "Using the variable on range scope"
- path: crypto/sign_verify_test.go
text: "Using the variable on range scope"
linters:
enable-all: true
disable:
- dupl # Tool for code clone detection [fast: true, auto-fix: false]
- gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false]
- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false]
- goerr113 # Golang linter to check the errors handling expressions [fast: true, auto-fix: false]
- gomnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false]
- lll # Reports long lines [fast: true, auto-fix: false]
- testpackage # Makes you use a separate _test package [fast: true, auto-fix: false]
- wsl # Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false]
- gofumpt # Enforce a stricter format than gofmt
- gci # Enforce blank lines check
- nlreturn # Enforce blank lines for return statements
- exhaustivestruct # Enforce structures to be fully filled on instantiation - terrible with openpgp configs
- paralleltest # Detects missing usage of t.Parallel() method in your Go test
- forbidigo # Static analysis tool to forbid use of particular identifiers
- thelper # Enforce test helper formatting
- revive # Force CamelCase instead of all caps
- nilerr # Force return err when not nil
- wrapcheck # Force wrapping of external error TODO: when the bug is fixed update the linter
- gomoddirectives # Prohibits the use of replace statements
- varnamelen # Forbids short var names
- ireturn # Prevents returning interfaces
- forcetypeassert # Forces to assert types in tests
- nonamedreturns # Disallows named returns
- exhaustruct # Forces all structs to be named
- nosnakecase # Disallows snake case
- depguard
- nestif