docs: note that exhaustruct struct regular expressions are expected to match the entire package/name/structname (#4190)

This commit is contained in:
Peter Mescalchin 2023-11-10 03:59:12 +11:00 committed by GitHub
parent 42001943c0
commit 467d563208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,16 +356,18 @@ linters-settings:
- 'example.com/package.ExampleStruct'
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.
# Default: []
include:
- '.*\.Test'
- '.+\.Test'
- '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: []
exclude:
- 'cobra\.Command$'
- '.+/cobra\.Command$'
forbidigo:
# Forbid the following identifiers (list of regexp).