@@ -31,10 +31,8 @@ linters:
3131 - errchkjson
3232 - errname
3333 - errorlint
34- - execinquery
3534 - exhaustive
3635 - exhaustruct
37- - exportloopref
3836 - exptostd
3937 - fatcontext
4038 - forbidigo
@@ -106,7 +104,6 @@ linters:
106104 - stylecheck
107105 - tagalign
108106 - tagliatelle
109- - tenv
110107 - testableexamples
111108 - testifylint
112109 - testpackage
@@ -150,10 +147,8 @@ linters:
150147 - errchkjson
151148 - errname
152149 - errorlint
153- - execinquery
154150 - exhaustive
155151 - exhaustruct
156- - exportloopref
157152 - exptostd
158153 - fatcontext
159154 - forbidigo
@@ -225,7 +220,6 @@ linters:
225220 - stylecheck
226221 - tagalign
227222 - tagliatelle
228- - tenv
229223 - testableexamples
230224 - testifylint
231225 - testpackage
@@ -243,15 +237,18 @@ linters:
243237 - wsl
244238 - zerologlint
245239 - deadcode # Deprecated
240+ - execinquery # Deprecated
246241 - exhaustivestruct # Deprecated
242+ - exportloopref # Deprecated
247243 - golint # Deprecated
244+ - gomnd # Deprecated
248245 - ifshort # Deprecated
249246 - interfacer # Deprecated
250247 - maligned # Deprecated
251- - gomnd # Deprecated
252248 - nosnakecase # Deprecated
253249 - scopelint # Deprecated
254250 - structcheck # Deprecated
251+ - tenv # Deprecated
255252 - varcheck # Deprecated
256253
257254 # Enable presets.
@@ -548,6 +545,12 @@ linters-settings:
548545 exclude :
549546 - ' .+/cobra\.Command$'
550547
548+ fatcontext :
549+ # Check for potential fat contexts in struct pointers.
550+ # May generate false positives.
551+ # Default: false
552+ check-struct-pointers : true
553+
551554 forbidigo :
552555 # Forbid the following identifiers (list of regexp).
553556 # Default: ["^(fmt\\.Print(|f|ln)|print|println)$"]
@@ -1841,7 +1844,7 @@ linters-settings:
18411844 - sortslice
18421845 # Check signature of methods of well-known interfaces.
18431846 - stdmethods
1844- # Check for uses of too-new standard library symbols.
1847+ # Report uses of too-new standard library symbols.
18451848 - stdversion
18461849 # Check for string(int) conversions.
18471850 - stringintconv
@@ -1863,7 +1866,7 @@ linters-settings:
18631866 - unusedresult
18641867 # Checks for unused writes.
18651868 - unusedwrite
1866- # Checks for misuses of sync.WaitGroup.
1869+ # Check for misuses of sync.WaitGroup.
18671870 - waitgroup
18681871
18691872 # Enable all analyzers.
@@ -1908,6 +1911,7 @@ linters-settings:
19081911 - slog
19091912 - sortslice
19101913 - stdmethods
1914+ - stdversion
19111915 - stringintconv
19121916 - structtag
19131917 - testinggoroutine
@@ -1918,6 +1922,7 @@ linters-settings:
19181922 - unsafeptr
19191923 - unusedresult
19201924 - unusedwrite
1925+ - waitgroup
19211926
19221927 # Settings per analyzer.
19231928 settings :
@@ -2238,23 +2243,37 @@ linters-settings:
22382243 # still required to have `t.Parallel`, but subtests are allowed to skip it.
22392244 # Default: false
22402245 ignore-missing-subtests : true
2241-
22422246 perfsprint :
2247+ # Enable/disable optimization of integer formatting.
2248+ # Default: true
2249+ integer-format : false
22432250 # Optimizes even if it requires an int or uint type cast.
22442251 # Default: true
22452252 int-conversion : false
2253+ # Enable/disable optimization of error formatting.
2254+ # Default: true
2255+ error-format : false
22462256 # Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
22472257 # Default: false
22482258 err-error : true
22492259 # Optimizes `fmt.Errorf`.
22502260 # Default: true
22512261 errorf : false
2262+ # Enable/disable optimization of string formatting.
2263+ # Default: true
2264+ string-format : false
22522265 # Optimizes `fmt.Sprintf` with only one argument.
22532266 # Default: true
22542267 sprintf1 : false
22552268 # Optimizes into strings concatenation.
22562269 # Default: true
22572270 strconcat : false
2271+ # Enable/disable optimization of bool formatting.
2272+ # Default: true
2273+ bool-format : false
2274+ # Enable/disable optimization of hex formatting.
2275+ # Default: true
2276+ hex-format : false
22582277
22592278 prealloc :
22602279 # IMPORTANT: we don't recommend using this linter before doing performance profiling.
@@ -2371,7 +2390,7 @@ linters-settings:
23712390 # This means that linting errors with less than 0.8 confidence will be ignored.
23722391 # Default: 0.8
23732392 confidence : 0.1
2374-
2393+ # Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules.
23752394 rules :
23762395 # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant
23772396 - name : add-constant
@@ -2508,6 +2527,7 @@ linters-settings:
25082527 exclude : [""]
25092528 arguments :
25102529 - " preserveScope"
2530+ - " allowJump"
25112531 # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-block
25122532 - name : empty-block
25132533 severity : warning
@@ -2591,7 +2611,7 @@ linters-settings:
25912611 disabled : false
25922612 exclude : [""]
25932613 arguments :
2594- - " ^[_a-z][_a-z0-9]*.go$"
2614+ - " ^[_a-z][_a-z0-9]*\\ .go$"
25952615 # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#flag-parameter
25962616 - name : flag-parameter
25972617 severity : warning
@@ -2726,6 +2746,11 @@ linters-settings:
27262746 severity : warning
27272747 disabled : false
27282748 exclude : [""]
2749+ # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-build-tag
2750+ - name : redundant-build-tag
2751+ severity : warning
2752+ disabled : false
2753+ exclude : [""]
27292754 # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-import-alias
27302755 - name : redundant-import-alias
27312756 severity : warning
@@ -2835,6 +2860,11 @@ linters-settings:
28352860 severity : warning
28362861 disabled : false
28372862 exclude : [""]
2863+ # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-errors-new
2864+ - name : use-errors-new
2865+ severity : warning
2866+ disabled : false
2867+ exclude : [""]
28382868 # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-break
28392869 - name : useless-break
28402870 severity : warning
@@ -3639,8 +3669,8 @@ linters-settings:
36393669 os-mkdir-temp : false
36403670
36413671 # Enable/disable `os.Setenv()` detections.
3642- # Default: false
3643- os-setenv : true
3672+ # Default: true
3673+ os-setenv : false
36443674
36453675 # Enable/disable `os.TempDir()` detections.
36463676 # Default: false
@@ -4026,6 +4056,10 @@ issues:
40264056 # Default: false
40274057 new : true
40284058
4059+ # Show only new issues created after the best common ancestor (merge-base against HEAD).
4060+ # Default: ""
4061+ new-from-merge-base : main
4062+
40294063 # Show only new issues created after git revision `REV`.
40304064 # Default: ""
40314065 new-from-rev : HEAD
@@ -4124,6 +4158,16 @@ run:
41244158 # Default: 1m
41254159 timeout : 5m
41264160
4161+ # The mode used to evaluate relative paths.
4162+ # It's used by exclusions, Go plugins, and some linters.
4163+ # The value can be:
4164+ # - `gomod`: the paths will be relative to the directory of the `go.mod` file.
4165+ # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).
4166+ # - `cfg`: the paths will be relative to the configuration file.
4167+ # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.
4168+ # Default: wd
4169+ relative-path-mode : gomod
4170+
41274171 # Exit code when at least one issue was found.
41284172 # Default: 1
41294173 issues-exit-code : 2
0 commit comments