22 # timeout for analysis
33 deadline : 4m
44
5- # Linting uses a lot of memory. Keep it under control by only running a single
6- # worker.
7- concurrency : 1
5+ skip-files :
6+ - " \\ .pb \\ .go$ "
7+ - " \\ .pb \\ .gw \\ .go$ "
88
99linters-settings :
10+ govet :
11+ # Don't report about shadowed variables
12+ check-shadowing : false
13+
1014 gofmt :
1115 # simplify code: gofmt with `-s` option, true by default
1216 simplify : true
1317
18+ tagliatelle :
19+ case :
20+ rules :
21+ json : snake
22+
23+ whitespace :
24+ multi-func : true
25+ multi-if : true
26+
27+ gosec :
28+ excludes :
29+ - G402 # Look for bad TLS connection settings.
30+ - G306 # Poor file permissions used when writing to a new file.
31+
32+ staticcheck :
33+ go : " 1.18"
34+ checks : ["-SA1019"]
35+
1436linters :
1537 enable-all : true
1638 disable :
17- # Global variables are used in many places throughout the code base.
39+ # Global variables are used in many places throughout the code base.
1840 - gochecknoglobals
1941
2042 # Some lines are over 80 characters on purpose and we don't want to make them
2143 # even longer by marking them as 'nolint'.
2244 - lll
2345
24- # We don't care (enough) about misaligned structs to lint that.
25- - maligned
46+ # We want to allow short variable names.
47+ - varnamelen
48+
49+ # We want to allow TODOs.
50+ - godox
2651
2752 # We have long functions, especially in tests. Moving or renaming those would
2853 # trigger funlen problems that we may not want to solve at that time.
2954 - funlen
3055
3156 # Disable for now as we haven't yet tuned the sensitivity to our codebase
32- # yet. Enabling by default for example, would also force new contributors to
57+ # yet. Enabling by default for example, would also force new contributors to
3358 # potentially extensively refactor code, when they want to smaller change to
3459 # land.
3560 - gocyclo
61+ - gocognit
62+ - cyclop
3663
3764 # Instances of table driven tests that don't pre-allocate shouldn't trigger
3865 # the linter.
3966 - prealloc
4067
4168 # Init functions are used by loggers throughout the codebase.
4269 - gochecknoinits
70+
71+ # Causes stack overflow, see https://github.com/polyfloyd/go-errorlint/issues/19.
72+ - errorlint
73+
74+ # Deprecated linters. See https://golangci-lint.run/usage/linters/.
75+ - interfacer
76+ - golint
77+ - maligned
78+ - scopelint
79+
80+ # New linters that need a code adjustment first.
81+ - wrapcheck
82+ - nolintlint
83+ - paralleltest
84+ - tparallel
85+ - testpackage
86+ - gofumpt
87+ - gomoddirectives
88+ - ireturn
89+ - maintidx
90+ - nlreturn
91+ - dogsled
92+ - gci
93+ - containedctx
94+ - contextcheck
95+ - errname
96+ - exhaustivestruct
97+ - goerr113
98+ - gomnd
99+ - ifshort
100+ - noctx
101+ - nestif
102+ - wsl
103+ - exhaustive
104+ - forcetypeassert
105+ - nilerr
106+ - nilnil
107+ - stylecheck
108+ - thelper
109+
110+ # Additions compared to LND
111+ - exhaustruct
43112
44113issues :
45114 # Only show newly introduced problems.
46115 new-from-rev : 36838cf7f464cf73b0201798063b2caffeae4250
116+
117+ exclude-rules :
118+
119+ # Allow fmt.Printf() in test files
120+ - path : _test\.go
121+ linters :
122+ - forbidigo
123+
124+ # Allow fmt.Printf() in loopd
125+ - path : cmd/loopd/*
126+ linters :
127+ - forbidigo
128+ - path : loopd/*
129+ linters :
130+ - forbidigo
131+
132+ # Allow fmt.Printf() in loop
133+ - path : cmd/loop/*
134+ linters :
135+ - forbidigo
0 commit comments