bring back comments to .golangci.yml

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf 2025-03-25 23:09:12 +03:00
parent 61703a147f
commit d3464efffd
No known key found for this signature in database

View File

@ -59,18 +59,19 @@ linters:
rules: rules:
- linters: - linters:
- gosec - gosec
text: G115 text: G115 # TODO: Either we should fix the issues or nuke the linter if it's bad
- linters: - linters:
- gosec - gosec
text: G107 text: G107 # we aren't calling unknown URL
- linters: - linters:
- gosec - gosec
text: G203 text: G203 # as a web server that's expected to handle any template, this is totally in the hands of the user.
- linters: - linters:
- gosec - gosec
text: G204 text: G204 # we're shelling out to known commands, not relying on user-defined input.
- linters: - linters:
- gosec - gosec
# the choice of weakrand is deliberate, hence the named import "weakrand"
path: modules/caddyhttp/reverseproxy/selectionpolicies.go path: modules/caddyhttp/reverseproxy/selectionpolicies.go
text: G404 text: G404
- linters: - linters:
@ -102,10 +103,10 @@ formatters:
settings: settings:
gci: gci:
sections: sections:
- standard - standard # Standard section: captures all standard packages.
- default - default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/caddyserver/caddy/v2/cmd) - prefix(github.com/caddyserver/caddy/v2/cmd) # ensure that this is always at the top and always has a line break.
- prefix(github.com/caddyserver/caddy) - prefix(github.com/caddyserver/caddy) # Custom section: groups all imports with the specified Prefix.
custom-order: true custom-order: true
exclusions: exclusions:
generated: lax generated: lax