From 467d5632082a51b81cced4182a33eb1d807c350c Mon Sep 17 00:00:00 2001 From: Peter Mescalchin Date: Fri, 10 Nov 2023 03:59:12 +1100 Subject: [PATCH] docs: note that `exhaustruct` struct regular expressions are expected to match the entire `package/name/structname` (#4190) --- .golangci.reference.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.golangci.reference.yml b/.golangci.reference.yml index 248e8583..f6df26a4 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -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).