chore(style): improved linters and formatters scope

This commit is contained in:
ITQ
2025-10-27 22:18:01 +03:00
parent b38c3ed90c
commit 7febcd136a
+9 -9
View File
@@ -26,7 +26,7 @@ formatters:
## you may want to enable ## you may want to enable
#- gci # checks if code and import statements are formatted, with additional rules #- gci # checks if code and import statements are formatted, with additional rules
- gofmt # checks if the code is formatted according to 'gofmt' command - gofmt # checks if the code is formatted according to 'gofmt' command
- gofumpt # enforces a stricter format than 'gofmt', while being backwards compatible #- gofumpt # enforces a stricter format than 'gofmt', while being backwards compatible
- swaggo # formats swaggo comments - swaggo # formats swaggo comments
# All settings can be found here https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml # All settings can be found here https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml
@@ -78,7 +78,7 @@ linters:
- gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
- goprintffuncname # checks that printf-like functions are named with f at the end - goprintffuncname # checks that printf-like functions are named with f at the end
- gosec # inspects source code for security problems - gosec # inspects source code for security problems
# - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- iface # checks the incorrect use of interfaces, helping developers avoid interface pollution - iface # checks the incorrect use of interfaces, helping developers avoid interface pollution
- ineffassign # detects when assignments to existing variables are not used - ineffassign # detects when assignments to existing variables are not used
- intrange # finds places where for loops could make use of an integer range - intrange # finds places where for loops could make use of an integer range
@@ -213,12 +213,12 @@ linters:
deny: deny:
- pkg: math/rand$ - pkg: math/rand$
desc: Use math/rand/v2 instead, see https://go.dev/blog/randv2 desc: Use math/rand/v2 instead, see https://go.dev/blog/randv2
"non-main files": # "non-main files":
files: # files:
- "!**/main.go" # - "!**/main.go"
deny: # deny:
- pkg: log$ # - pkg: log$
desc: Use log/slog instead, see https://go.dev/blog/slog # desc: Use log/slog instead, see https://go.dev/blog/slog
embeddedstructfieldcheck: embeddedstructfieldcheck:
# Checks that sync.Mutex and sync.RWMutex are not used as embedded fields. # Checks that sync.Mutex and sync.RWMutex are not used as embedded fields.
@@ -335,7 +335,7 @@ linters:
shadow: shadow:
# Whether to be strict about shadowing; can be noisy. # Whether to be strict about shadowing; can be noisy.
# Default: false # Default: false
strict: true strict: false
inamedparam: inamedparam:
# Skips check for interface methods with only a single parameter. # Skips check for interface methods with only a single parameter.