1run:
2 tests: true
3 skip-dirs:
4 - _examples
5
6output:
7 print-issued-lines: false
8
9linters:
10 enable-all: true
11 disable:
12 - maligned
13 - megacheck
14 - lll
15 - gocyclo
16 - dupl
17 - gochecknoglobals
18 - funlen
19 - godox
20 - wsl
21 - gomnd
22 - gocognit
23 - goerr113
24 - nolintlint
25 - testpackage
26 - godot
27 - nestif
28 - paralleltest
29 - nlreturn
30 - cyclop
31 - exhaustivestruct
32 - gci
33 - gofumpt
34 - errorlint
35 - exhaustive
36 - ifshort
37 - wrapcheck
38 - stylecheck
39 - thelper
40 - nonamedreturns
41 - revive
42 - dupword
43 - exhaustruct
44 - varnamelen
45 - forcetypeassert
46 - ireturn
47 - maintidx
48 - govet
49 - nosnakecase
50 - testableexamples
51 - musttag
52 - depguard
53 - goconst
54 - perfsprint
55 - mnd
56 - predeclared
57
58linters-settings:
59 govet:
60 check-shadowing: true
61 gocyclo:
62 min-complexity: 10
63 dupl:
64 threshold: 100
65 goconst:
66 min-len: 8
67 min-occurrences: 3
68 forbidigo:
69 #forbid:
70 # - (Must)?NewLexer$
71 exclude_godoc_examples: false
72
73
74issues:
75 max-per-linter: 0
76 max-same: 0
77 exclude-use-default: false
78 exclude:
79 # Captured by errcheck.
80 - '^(G104|G204):'
81 # Very commonly not checked.
82 - 'Error return value of .(.*\.Help|.*\.MarkFlagRequired|(os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked'
83 - 'exported method (.*\.MarshalJSON|.*\.UnmarshalJSON|.*\.EntityURN|.*\.GoString|.*\.Pos) should have comment or be unexported'
84 - 'composite literal uses unkeyed fields'
85 - 'declaration of "err" shadows declaration'
86 - 'should not use dot imports'
87 - 'Potential file inclusion via variable'
88 - 'should have comment or be unexported'
89 - 'comment on exported var .* should be of the form'
90 - 'at least one file in a package should have a package comment'
91 - 'string literal contains the Unicode'
92 - 'methods on the same type should have the same receiver name'
93 - '_TokenType_name should be _TokenTypeName'
94 - '`_TokenType_map` should be `_TokenTypeMap`'
95 - 'rewrite if-else to switch statement'