docs: note that exhaustruct
struct regular expressions are expected to match the entire package/name/structname
(#4190)
This commit is contained in:
parent
42001943c0
commit
467d563208
@ -356,16 +356,18 @@ linters-settings:
|
|||||||
- 'example.com/package.ExampleStruct'
|
- 'example.com/package.ExampleStruct'
|
||||||
|
|
||||||
exhaustruct:
|
exhaustruct:
|
||||||
# List of regular expressions to match struct packages and names.
|
# List of regular expressions to match struct packages and their names.
|
||||||
|
# Regular expressions must match complete canonical struct package/name/structname.
|
||||||
# If this list is empty, all structs are tested.
|
# If this list is empty, all structs are tested.
|
||||||
# Default: []
|
# Default: []
|
||||||
include:
|
include:
|
||||||
- '.*\.Test'
|
- '.+\.Test'
|
||||||
- 'example\.com/package\.ExampleStruct[\d]{1,2}'
|
- 'example\.com/package\.ExampleStruct[\d]{1,2}'
|
||||||
# List of regular expressions to exclude struct packages and names from check.
|
# List of regular expressions to exclude struct packages and their names from checks.
|
||||||
|
# Regular expressions must match complete canonical struct package/name/structname.
|
||||||
# Default: []
|
# Default: []
|
||||||
exclude:
|
exclude:
|
||||||
- 'cobra\.Command$'
|
- '.+/cobra\.Command$'
|
||||||
|
|
||||||
forbidigo:
|
forbidigo:
|
||||||
# Forbid the following identifiers (list of regexp).
|
# Forbid the following identifiers (list of regexp).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user