1+ run :
2+ # timeout for analysis
3+ timeout : 4m
4+
5+ go : " 1.23"
6+
7+ linters-settings :
8+ govet :
9+ # Don't report about shadowed variables
10+ shadowing : false
11+
12+ gofmt :
13+ # simplify code: gofmt with `-s` option, true by default
14+ simplify : true
15+
16+ tagliatelle :
17+ case :
18+ rules :
19+ json : snake
20+
21+ whitespace :
22+ multi-func : true
23+ multi-if : true
24+
25+ gosec :
26+ excludes :
27+ - G402 # Look for bad TLS connection settings.
28+ - G306 # Poor file permissions used when writing to a new file.
29+ - G115 # Integer overflow conversion.
30+
31+ staticcheck :
32+ checks : [ "-SA1019" ]
33+
34+ linters :
35+ enable-all : true
36+ disable :
37+ # Global variables are used in many places throughout the code base.
38+ - gochecknoglobals
39+
40+ # Some lines are over 80 characters on purpose and we don't want to make them
41+ # even longer by marking them as 'nolint'.
42+ - lll
43+
44+ # We want to allow short variable names.
45+ - varnamelen
46+
47+ # We want to allow TODOs.
48+ - godox
49+
50+ # We have long functions, especially in tests. Moving or renaming those would
51+ # trigger funlen problems that we may not want to solve at that time.
52+ - funlen
53+
54+ # Disable for now as we haven't yet tuned the sensitivity to our codebase
55+ # yet. Enabling by default for example, would also force new contributors to
56+ # potentially extensively refactor code, when they want to smaller change to
57+ # land.
58+ - gocyclo
59+ - gocognit
60+ - cyclop
61+
62+ # Instances of table driven tests that don't pre-allocate shouldn't trigger
63+ # the linter.
64+ - prealloc
65+
66+ # Init functions are used by loggers throughout the codebase.
67+ - gochecknoinits
68+
69+ # Causes stack overflow, see https://github.com/polyfloyd/go-errorlint/issues/19.
70+ - errorlint
71+
72+ # New linters that need a code adjustment first.
73+ - wrapcheck
74+ - nolintlint
75+ - paralleltest
76+ - tparallel
77+ - testpackage
78+ - gofumpt
79+ - gomoddirectives
80+ - ireturn
81+ - maintidx
82+ - nlreturn
83+ - dogsled
84+ - gci
85+ - containedctx
86+ - contextcheck
87+ - errname
88+ - err113
89+ - mnd
90+ - noctx
91+ - nestif
92+ - wsl
93+ - exhaustive
94+ - forcetypeassert
95+ - nilerr
96+ - nilnil
97+ - stylecheck
98+ - thelper
99+ - revive
100+ - tagalign
101+ - depguard
102+ - interfacebloat
103+ - inamedparam
104+ - intrange
105+ - perfsprint
106+ - protogetter
107+ - testifylint
108+
109+ # Additions compared to LND
110+ - exhaustruct
111+
112+ issues :
113+ # Only show newly introduced problems.
114+ new-from-rev : 36838cf7f464cf73b0201798063b2caffeae4250
115+
116+ exclude-files :
117+ - " \\ .pb\\ .go$"
118+ - " \\ .pb\\ .gw\\ .go$"
119+
120+ exclude-rules :
121+ # Allow fmt.Printf() in test files
122+ - path : _test\.go
123+ linters :
124+ - forbidigo
125+ - unparam
126+ - gosec
127+ - path : _mock\.go
128+ linters :
129+ - gosec
130+
131+ # Allow fmt.Printf() in loopd
132+ - path : cmd/loopd/*
133+ linters :
134+ - forbidigo
135+ - errcheck
136+ - path : loopd/*
137+ linters :
138+ - forbidigo
139+
140+ # Allow fmt.Printf() in loop
141+ - path : cmd/loop/*
142+ linters :
143+ - forbidigo
144+ - errcheck
145+
146+ # Allow fmt.Printf() in stateparser
147+ - path : fsm/stateparser/*
148+ linters :
149+ - forbidigo
0 commit comments