1- ---
2- linters-settings :
3- dupl :
4- threshold : 100
5- exhaustive :
6- default-signifies-exhaustive : false
7- funlen :
8- lines : 100
9- statements : 50
10- gci :
11- sections :
12- - standard
13- - default
14- - localmodule
15- goconst :
16- min-len : 2
17- min-occurrences : 2
18- gocritic :
19- enabled-tags :
20- - diagnostic
21- - experimental
22- - opinionated
23- - performance
24- - style
25- disabled-checks :
26- - dupImport # https://github.com/go-critic/go-critic/issues/845
27- - ifElseChain
28- - octalLiteral
29- - whyNoLint
30- - wrapperFunc
31- gocyclo :
32- min-complexity : 10
33- goimports :
34- local-prefixes : github.com/golangci/golangci-lint
35- mnd :
36- checks :
37- - argument
38- - case
39- - condition
40- - return
41- govet :
42- enable :
43- - shadow
44- settings :
45- printf :
46- funcs :
47- - (gofr.dev/pkg/gofr/Logger).Logf
48- - (gofr.dev/pkg/gofr/Logger).Errorf
49- lll :
50- line-length : 140
51- misspell :
52- locale : US
53- nolintlint :
54- allow-unused : false # report any unused nolint directives
55- require-explanation : true # require an explanation for nolint directives
56- require-specific : true # require nolint directives to be specific about which linter is being skipped
57- revive :
58- rules :
59- # default revive rules, they have to be present otherwise they are disabled
60- - name : blank-imports
61- - name : context-as-argument
62- - name : context-keys-type
63- - name : dot-imports
64- - name : empty-block
65- - name : error-naming
66- - name : error-return
67- - name : error-strings
68- - name : errorf
69- - name : increment-decrement
70- - name : indent-error-flow
71- - name : range
72- - name : receiver-naming
73- - name : redefines-builtin-id
74- - name : superfluous-else
75- - name : time-naming
76- - name : unexported-return
77- - name : unreachable-code
78- - name : unused-parameter
79- - name : var-declaration
80- - name : var-naming
81- # additional revive rules
82- - name : bare-return
83- - name : bool-literal-in-expr
84- - name : comment-spacings
85- - name : early-return
86- - name : defer
87- - name : deep-exit
88- - name : unused-receiver
89-
1+ version : " 2"
902linters :
91- # please, do not use `enable-all`: it's deprecated and will be removed soon.
92- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
93- disable-all : true
3+ default : none
944 enable :
955 - asciicheck
966 - bodyclose
7+ - canonicalheader
8+ - copyloopvar
979 - dogsled
9810 - dupl
9911 - err113
10012 - errcheck
10113 - errorlint
10214 - exhaustive
103- - exportloopref
10415 - funlen
10516 - gochecknoglobals
10617 - gochecknoinits
@@ -109,11 +20,8 @@ linters:
10920 - gocritic
11021 - gocyclo
11122 - godot
112- - gofmt
113- - goimports
11423 - goprintffuncname
11524 - gosec
116- - gosimple
11725 - govet
11826 - ineffassign
11927 - lll
@@ -128,26 +36,140 @@ linters:
12836 - revive
12937 - rowserrcheck
13038 - staticcheck
131- - stylecheck
39+ - testifylint
13240 - thelper
13341 - unconvert
13442 - unparam
13543 - unused
13644 - usestdlibvars
45+ - usetesting
13746 - whitespace
138- - wsl
47+ - wsl_v5
13948
140- # don't enable:
141- # - godox # Disabling because we need TODO lines at this stage of project.
142- # - testpackage # We also need to do unit test for unexported functions. And adding _internal in all files is cumbersome.
49+ # don't enable:
50+ # - godox # Disabling because we need TODO lines at this stage of project.
51+ # - testpackage # We also need to do unit test for unexported functions. And adding _internal in all files is cumbersome.
14352
144- issues :
145- # exclude-use-default: false
146- # exclude-use-default: false # By default, golangci-lint does not enforce comments on exported types. We want it.
147- # Excluding configuration per-path, per-linter, per-text and per-source
148- exclude-rules :
149- - path : _test\.go
150- linters :
151- - gomnd
152- - dupl
153- - goconst
53+ settings :
54+ dupl :
55+ threshold : 100
56+ exhaustive :
57+ default-signifies-exhaustive : false
58+ funlen :
59+ lines : 100
60+ statements : 50
61+ goconst :
62+ min-len : 2
63+ min-occurrences : 2
64+ gocritic :
65+ disabled-checks :
66+ - dupImport # https://github.com/go-critic/go-critic/issues/845
67+ - ifElseChain
68+ - octalLiteral
69+ - whyNoLint
70+ - wrapperFunc
71+ enabled-tags :
72+ - diagnostic
73+ - experimental
74+ - opinionated
75+ - performance
76+ - style
77+ gocyclo :
78+ min-complexity : 10
79+ govet :
80+ enable :
81+ - shadow
82+ settings :
83+ printf :
84+ funcs :
85+ - (gofr.dev/pkg/gofr/Logger).Logf
86+ - (gofr.dev/pkg/gofr/Logger).Errorf
87+ lll :
88+ line-length : 140
89+ misspell :
90+ locale : US
91+ mnd :
92+ checks :
93+ - argument
94+ - case
95+ - condition
96+ - return
97+ nolintlint :
98+ require-explanation : true # require an explanation for nolint directives
99+ require-specific : true # require nolint directives to be specific about which linter is being skipped
100+ allow-unused : false # report any unused nolint directives
101+ revive :
102+ rules :
103+ - name : blank-imports
104+ - name : context-as-argument
105+ - name : context-keys-type
106+ - name : dot-imports
107+ - name : empty-block
108+ - name : error-naming
109+ - name : error-return
110+ - name : error-strings
111+ - name : errorf
112+ - name : exported
113+ arguments :
114+ # enables checking public methods of private types
115+ - checkPrivateReceivers
116+ # make error messages clearer
117+ - sayRepetitiveInsteadOfStutters
118+ - name : increment-decrement
119+ - name : indent-error-flow
120+ - name : range
121+ - name : receiver-naming
122+ - name : redefines-builtin-id
123+ - name : superfluous-else
124+ - name : time-naming
125+ - name : unexported-return
126+ - name : unreachable-code
127+ - name : unused-parameter
128+ - name : var-declaration
129+ - name : var-naming
130+ - name : bare-return
131+ - name : bool-literal-in-expr
132+ - name : comment-spacings
133+ - name : early-return
134+ - name : defer
135+ - name : deep-exit
136+ - name : unused-receiver
137+ - name : use-any
138+ staticcheck :
139+ checks :
140+ - all
141+ - -QF1001 # TODO remove this line and fix reported errors
142+ - -QF1003 # TODO remove this line and fix reported errors
143+ - -QF1008 # TODO remove this line and fix reported errors
144+ - -ST1000 # TODO remove this line and fix reported errors
145+ usestdlibvars :
146+ time-layout : true
147+ exclusions :
148+ presets :
149+ - common-false-positives # TODO fix errors reported by this and remove this line
150+ - legacy # TODO fix errors reported by this and remove this line
151+ - std-error-handling # TODO remove this line, configure errcheck, and fix reported errors
152+ rules :
153+ - linters :
154+ - dupl
155+ - goconst
156+ - mnd
157+ path : _test\.go
158+ - linters :
159+ - revive
160+ text : " exported (.+) should have comment" # TODO fix errors reported by this and remove this line
161+ paths :
162+ - examples # TODO remove this line and fix reported errors
163+ formatters :
164+ enable :
165+ - gci
166+ - gofmt
167+ settings :
168+ gci :
169+ sections :
170+ - standard
171+ - default
172+ - localmodule
173+ goimports :
174+ local-prefixes :
175+ - gofr.dev
0 commit comments