@@ -337,6 +337,7 @@ linters:
337
337
# List of file globs that will match this list of settings to compare against.
338
338
# By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
339
339
# The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`.
340
+ # The placeholder '${config-path}' is substituted with a path relative to the configuration file.
340
341
# Default: $all
341
342
files :
342
343
- " !**/*_a _file.go"
@@ -1171,6 +1172,7 @@ linters:
1171
1172
# Comma-separated list of file paths containing ruleguard rules.
1172
1173
# By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
1173
1174
# The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`.
1175
+ # The placeholder '${config-path}' is substituted with a path relative to the configuration file.
1174
1176
# Glob patterns such as 'rules-*.go' may be specified.
1175
1177
# Default: ""
1176
1178
rules : ' ${base-path}/ruleguard/rules-*.go,${base-path}/myrule1.go'
@@ -1266,6 +1268,7 @@ linters:
1266
1268
# Useful if you need to load the template from a specific file.
1267
1269
# By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
1268
1270
# The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`.
1271
+ # The placeholder '${config-path}' is substituted with a path relative to the configuration file.
1269
1272
# Default: ""
1270
1273
template-path : /path/to/my/template.tmpl
1271
1274
@@ -1349,7 +1352,6 @@ linters:
1349
1352
- G110 # Potential DoS vulnerability via decompression bomb
1350
1353
- G111 # Potential directory traversal
1351
1354
- G112 # Potential slowloris attack
1352
- - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
1353
1355
- G114 # Use of net/http serve function that has no support for setting timeouts
1354
1356
- G115 # Potential integer overflow when converting between integer types
1355
1357
- G201 # SQL query construction using format string
@@ -1394,7 +1396,6 @@ linters:
1394
1396
- G110 # Potential DoS vulnerability via decompression bomb
1395
1397
- G111 # Potential directory traversal
1396
1398
- G112 # Potential slowloris attack
1397
- - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
1398
1399
- G114 # Use of net/http serve function that has no support for setting timeouts
1399
1400
- G115 # Potential integer overflow when converting between integer types
1400
1401
- G201 # SQL query construction using format string
@@ -2179,10 +2180,10 @@ linters:
2179
2180
disabled : false
2180
2181
exclude : [""]
2181
2182
arguments :
2182
- - maxLitCount : " 3"
2183
- allowStrs : ' ""'
2184
- allowInts : " 0,1,2"
2185
- allowFloats : " 0.0,0.,1.0,1.,2.0,2."
2183
+ - max-lit-count : " 3"
2184
+ allow-strs : ' ""'
2185
+ allow-ints : " 0,1,2"
2186
+ allow-floats : " 0.0,0.,1.0,1.,2.0,2."
2186
2187
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#argument-limit
2187
2188
- name : argument-limit
2188
2189
severity : warning
@@ -2261,7 +2262,7 @@ linters:
2261
2262
disabled : false
2262
2263
exclude : [""]
2263
2264
arguments :
2264
- - allowTypesBefore : " *testing.T,*github.com/user/repo/testing.Harness"
2265
+ - allow-types-before : " *testing.T,*github.com/user/repo/testing.Harness"
2265
2266
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#context-keys-type
2266
2267
- name : context-keys-type
2267
2268
severity : warning
@@ -2301,7 +2302,7 @@ linters:
2301
2302
disabled : false
2302
2303
exclude : [""]
2303
2304
arguments :
2304
- - allowedPackages : ["github.com/onsi/ginkgo/v2", "github.com/onsi/gomega"]
2305
+ - allowed-packages : ["github.com/onsi/ginkgo/v2", "github.com/onsi/gomega"]
2305
2306
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#duplicated-imports
2306
2307
- name : duplicated-imports
2307
2308
severity : warning
@@ -2313,8 +2314,8 @@ linters:
2313
2314
disabled : false
2314
2315
exclude : [""]
2315
2316
arguments :
2316
- - " preserveScope "
2317
- - " allowJump "
2317
+ - " preserve-scope "
2318
+ - " allow-jump "
2318
2319
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-block
2319
2320
- name : empty-block
2320
2321
severity : warning
@@ -2340,8 +2341,8 @@ linters:
2340
2341
arguments :
2341
2342
- " short"
2342
2343
# Or this parameter:
2343
- - funcArgStyle : " full"
2344
- funcRetValStyle : " short"
2344
+ - func-arg-style : " full"
2345
+ func-ret-val-style : " short"
2345
2346
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-slice-style
2346
2347
- name : enforce-slice-style
2347
2348
severity : warning
@@ -2377,15 +2378,15 @@ linters:
2377
2378
disabled : false
2378
2379
exclude : [""]
2379
2380
arguments :
2380
- - " checkPrivateReceivers "
2381
- - " disableStutteringCheck "
2382
- - " sayRepetitiveInsteadOfStutters "
2383
- - " checkPublicInterface "
2384
- - " disableChecksOnConstants "
2385
- - " disableChecksOnFunctions "
2386
- - " disableChecksOnMethods "
2387
- - " disableChecksOnTypes "
2388
- - " disableChecksOnVariables "
2381
+ - " check-private-receivers "
2382
+ - " disable-stuttering-check "
2383
+ - " say-repetitive-instead-of-stutters "
2384
+ - " check-public-interface "
2385
+ - " disable-checks-on-constants "
2386
+ - " disable-checks-on-functions "
2387
+ - " disable-checks-on-methods "
2388
+ - " disable-checks-on-types "
2389
+ - " disable-checks-on-variables "
2389
2390
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#file-header
2390
2391
- name : file-header
2391
2392
severity : warning
@@ -2400,8 +2401,8 @@ linters:
2400
2401
exclude : [""]
2401
2402
arguments :
2402
2403
- max : 100
2403
- skipComments : true
2404
- skipBlankLines : true
2404
+ skip-comments : true
2405
+ skip-blank-lines : true
2405
2406
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#filename-format
2406
2407
- name : filename-format
2407
2408
severity : warning
@@ -2449,8 +2450,8 @@ linters:
2449
2450
arguments :
2450
2451
- " ^[a-z][a-z0-9]{0,}$"
2451
2452
# Or this parameter:
2452
- - allowRegex : " ^[a-z][a-z0-9]{0,}$"
2453
- denyRegex : ' ^v\d+$'
2453
+ - allow-regex : " ^[a-z][a-z0-9]{0,}$"
2454
+ deny-regex : ' ^v\d+$'
2454
2455
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-shadowing
2455
2456
- name : import-shadowing
2456
2457
severity : warning
@@ -2475,7 +2476,7 @@ linters:
2475
2476
disabled : false
2476
2477
exclude : [""]
2477
2478
arguments :
2478
- - " preserveScope "
2479
+ - " preserve-scope "
2479
2480
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#line-length-limit
2480
2481
- name : line-length-limit
2481
2482
severity : warning
@@ -2540,7 +2541,7 @@ linters:
2540
2541
disabled : false
2541
2542
exclude : [""]
2542
2543
arguments :
2543
- - maxLength : 2
2544
+ - max-length : 2
2544
2545
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redefines-builtin-id
2545
2546
- name : redefines-builtin-id
2546
2547
severity : warning
@@ -2556,6 +2557,11 @@ linters:
2556
2557
severity : warning
2557
2558
disabled : false
2558
2559
exclude : [""]
2560
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-test-main-exit
2561
+ - name : redundant-test-main-exit
2562
+ severity : warning
2563
+ disabled : false
2564
+ exclude : [""]
2559
2565
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#string-format
2560
2566
- name : string-format
2561
2567
severity : warning
@@ -2590,7 +2596,7 @@ linters:
2590
2596
disabled : false
2591
2597
exclude : [""]
2592
2598
arguments :
2593
- - " preserveScope "
2599
+ - " preserve-scope "
2594
2600
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-equal
2595
2601
- name : time-equal
2596
2602
severity : warning
@@ -2607,7 +2613,7 @@ linters:
2607
2613
disabled : false
2608
2614
exclude : [""]
2609
2615
arguments :
2610
- - acceptIgnoredAssertionResult : true
2616
+ - accept-ignored-assertion-result : true
2611
2617
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unconditional-recursion
2612
2618
- name : unconditional-recursion
2613
2619
severity : warning
@@ -2647,14 +2653,14 @@ linters:
2647
2653
disabled : false
2648
2654
exclude : [""]
2649
2655
arguments :
2650
- - allowRegex : " ^_"
2656
+ - allow-regex : " ^_"
2651
2657
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-receiver
2652
2658
- name : unused-receiver
2653
2659
severity : warning
2654
2660
disabled : false
2655
2661
exclude : [""]
2656
2662
arguments :
2657
- - allowRegex : " ^_"
2663
+ - allow-regex : " ^_"
2658
2664
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-any
2659
2665
- name : use-any
2660
2666
severity : warning
@@ -2683,7 +2689,7 @@ linters:
2683
2689
arguments :
2684
2690
- [ "ID" ] # AllowList
2685
2691
- [ "VM" ] # DenyList
2686
- - - upperCaseConst : true # Extra parameter (upperCaseConst|skipPackageNameChecks )
2692
+ - - upper-case-const : true # Extra parameter (upper-case-const|skip-package-name-checks )
2687
2693
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#waitgroup-by-value
2688
2694
- name : waitgroup-by-value
2689
2695
severity : warning
@@ -2729,11 +2735,16 @@ linters:
2729
2735
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages
2730
2736
# Default: false
2731
2737
static-msg : true
2738
+ # Enforce message style.
2739
+ # Values: lowercased, capitalized
2740
+ # https://github.com/go-simpler/sloglint?tab=readme-ov-file#message-style
2741
+ # Default: ""
2742
+ msg-style : capitalized
2732
2743
# Enforce using constants instead of raw keys.
2733
2744
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys
2734
2745
# Default: false
2735
2746
no-raw-keys : true
2736
- # Enforce a single key naming convention.
2747
+ # Enforce key naming convention.
2737
2748
# Values: snake, kebab, camel, pascal
2738
2749
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention
2739
2750
# Default: ""
@@ -3405,12 +3416,6 @@ linters:
3405
3416
# Default: false
3406
3417
ignore : true
3407
3418
3408
- tenv :
3409
- # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures.
3410
- # Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked.
3411
- # Default: false
3412
- all : false
3413
-
3414
3419
testifylint :
3415
3420
# Enable all checkers (https://github.com/Antonboom/testifylint#checkers).
3416
3421
# Default: false
@@ -3768,6 +3773,9 @@ linters:
3768
3773
# Default: []
3769
3774
ignore-interface-regexps :
3770
3775
- ^(?i)c(?-i)ach(ing|e)
3776
+ # Determines whether wrapcheck should report errors returned from inside the package.
3777
+ # Default: false
3778
+ report-internal-errors : true
3771
3779
3772
3780
wsl :
3773
3781
# Do strict checking when assigning from append (x = append(x, y)).
@@ -4032,6 +4040,9 @@ formatters:
4032
4040
chain-split-dots : false
4033
4041
4034
4042
exclusions :
4043
+ # Log a warning if an exclusion path is unused.
4044
+ # Default: false
4045
+ warn-unused : true
4035
4046
# Mode of the generated files analysis.
4036
4047
#
4037
4048
# - `strict`: sources are excluded by strictly following the Go generated file convention.
@@ -4165,9 +4176,16 @@ output:
4165
4176
path : ./path/to/output.json
4166
4177
4167
4178
# Add a prefix to the output file references.
4179
+ # This option is ignored when using `output.path-mode: abs` mode.
4168
4180
# Default: ""
4169
4181
path-prefix : " "
4170
4182
4183
+ # By default, the report are related to the path obtained by `run.relative-path-mode`.
4184
+ # The mode `abs` allows to show absolute file paths instead of relative file paths.
4185
+ # The option `output.path-prefix` is ignored when using `abs` mode.
4186
+ # Default: ""
4187
+ path-mode : " abs"
4188
+
4171
4189
# Order to use when sorting results.
4172
4190
# Possible values: `file`, `linter`, and `severity`.
4173
4191
#
0 commit comments