Skip to content

Commit dc2b5f2

Browse files
committed
Add golangci-lint configuration
1 parent 9fe12cb commit dc2b5f2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.golangci.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
linters:
2+
enable:
3+
- asasalint
4+
- copyloopvar
5+
- decorder
6+
- dogsled
7+
- errname
8+
- exhaustive
9+
- exportloopref
10+
- fatcontext
11+
- forcetypeassert
12+
- gci
13+
- ginkgolinter
14+
- gofmt
15+
- grouper
16+
- importas
17+
- makezero
18+
- nakedret
19+
- nilerr
20+
- nilnil
21+
- predeclared
22+
- sloglint
23+
#- wrapcheck # this one will be useful, but we have to fix a multitude of errors
24+
#- unparam # when fixed, probably already covered by revive/gocritic
25+
#- revive # too many errors, but useful, similar to gocritic, so probably choose one
26+
#- prealloc # enable when can
27+
#- nestif # enable once we clean up the code
28+
#- gofumpt # fix all files before we switch to gofumpt
29+
#- gocritic # too many failures for now
30+
#- goconst # once we rewrite string literals to consts
31+
#- gochecknoglobals # once we rewrite terraform codegen and drop global functions
32+
#- funlen # couple of functions over 60 lines
33+
#- err113 # disabled because of too many dynamic errors that don't wrap anything
34+
35+
linters-settings:
36+
gci:
37+
sections:
38+
- standard
39+
- default
40+
- prefix(github.com/paloaltonetworks/pan-os-codegen)
41+
issues:
42+
exclude-dirs:
43+
- generated/

0 commit comments

Comments
 (0)