Skip to content

Commit 467d563

Browse files
docs: note that exhaustruct struct regular expressions are expected to match the entire package/name/structname (#4190)
1 parent 4200194 commit 467d563

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.golangci.reference.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -356,16 +356,18 @@ linters-settings:
356356
- 'example.com/package.ExampleStruct'
357357

358358
exhaustruct:
359-
# List of regular expressions to match struct packages and names.
359+
# List of regular expressions to match struct packages and their names.
360+
# Regular expressions must match complete canonical struct package/name/structname.
360361
# If this list is empty, all structs are tested.
361362
# Default: []
362363
include:
363-
- '.*\.Test'
364+
- '.+\.Test'
364365
- 'example\.com/package\.ExampleStruct[\d]{1,2}'
365-
# List of regular expressions to exclude struct packages and names from check.
366+
# List of regular expressions to exclude struct packages and their names from checks.
367+
# Regular expressions must match complete canonical struct package/name/structname.
366368
# Default: []
367369
exclude:
368-
- 'cobra\.Command$'
370+
- '.+/cobra\.Command$'
369371

370372
forbidigo:
371373
# Forbid the following identifiers (list of regexp).

0 commit comments

Comments
 (0)