Skip to content

docs: update documentation assets #6001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,42 @@ linters:
default-case-required: true

exhaustruct:
# 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.
# List of regular expressions to match type names that should be processed.
# Anonymous structs can be matched by '<anonymous>' alias.
#
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.
# Default: []
include:
- '.+\.Test'
- 'example\.com/package\.ExampleStruct[\d]{1,2}'
# List of regular expressions to exclude struct packages and their names from checks.
# Regular expressions must match complete canonical struct package/name/structname.
# List of regular expressions to match type names that should be excluded from processing.
# Anonymous structs can be matched by '<anonymous>' alias.
# Has precedence over `include`.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.
# Default: []
exclude:
- '.+/cobra\.Command$'
# Allows empty structures, effectively excluding them from the check.
# Default: false
allow-empty: true
# List of regular expressions to match type names that should be allowed to be empty.
# Anonymous structs can be matched by '<anonymous>' alias.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.
# Default: []
allow-empty-rx:
- '.*/http\.Cookie'
# Allows empty structures in return statements.
# Default: false
allow-empty-returns: true
# Allows empty structures in variable declarations.
# Default: false
allow-empty-declarations: true

fatcontext:
# Check for potential fat contexts in struct pointers.
Expand Down
2 changes: 1 addition & 1 deletion docs/data/linters_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"originalURL": "https://github.com/nishanths/exhaustive",
"internal": false,
"isSlow": true,
"since": " v1.28.0"
"since": "v1.28.0"
},
{
"name": "exhaustruct",
Expand Down
22 changes: 22 additions & 0 deletions jsonschema/golangci.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,28 @@
"items": {
"type": "string"
}
},
"allow-empty": {
"description": "Allows empty structures, effectively excluding them from the check.",
"type": "boolean",
"default": false
},
"allow-empty-rx": {
"description": "List of regular expressions to match type names that should be allowed to be empty.",
"type": "array",
"items": {
"type": "string"
}
},
"allow-empty-returns": {
"description": "Allows empty structures in return statements.",
"type": "boolean",
"default": false
},
"allow-empty-declarations": {
"description": "Allows empty structures in variable declarations.",
"type": "boolean",
"default": false
}
}
},
Expand Down
Loading