1run:
2 tests: true
3 max-same-issues: 50
4
5output:
6 print-issued-lines: false
7
8linters:
9 enable:
10 - gocyclo
11 - gocritic
12 - goconst
13 - dupl
14 - unconvert
15 - goimports
16 - unused
17 - govet
18 - nakedret
19 - errcheck
20 - revive
21 - ineffassign
22 - goconst
23 - unparam
24 - gofmt
25
26linters-settings:
27 vet:
28 check-shadowing: true
29 use-installed-packages: true
30 dupl:
31 threshold: 100
32 goconst:
33 min-len: 8
34 min-occurrences: 3
35 gocyclo:
36 min-complexity: 20
37 gocritic:
38 disabled-checks:
39 - ifElseChain
40 gofmt:
41 rewrite-rules:
42 - pattern: "interface{}"
43 replacement: "any"
44 - pattern: "a[b:len(a)]"
45 replacement: "a[b:]"
46
47issues:
48 max-per-linter: 0
49 max-same: 0
50 exclude-dirs:
51 - resources
52 - old
53 exclude-files:
54 - cmd/protopkg/main.go
55 exclude-use-default: false
56 exclude:
57 # Captured by errcheck.
58 - "^(G104|G204):"
59 # Very commonly not checked.
60 - 'Error return value of .(.*\.Help|.*\.MarkFlagRequired|(os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*Print(f|ln|)|os\.(Un)?Setenv). is not checked'
61 # Weird error only seen on Kochiku...
62 - "internal error: no range for"
63 - 'exported method `.*\.(MarshalJSON|UnmarshalJSON|URN|Payload|GoString|Close|Provides|Requires|ExcludeFromHash|MarshalText|UnmarshalText|Description|Check|Poll|Severity)` should have comment or be unexported'
64 - "composite literal uses unkeyed fields"
65 - 'declaration of "err" shadows declaration'
66 - "by other packages, and that stutters"
67 - "Potential file inclusion via variable"
68 - "at least one file in a package should have a package comment"
69 - "bad syntax for struct tag pair"