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
#- gci # checks if code and import statements are formatted, with additional rules
- 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
# 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
- goprintffuncname # checks that printf-like functions are named with f at the end
- 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
- ineffassign # detects when assignments to existing variables are not used
- intrange # finds places where for loops could make use of an integer range
@@ -213,12 +213,12 @@ linters:
deny:
- pkg: math/rand$
desc: Use math/rand/v2 instead, see https://go.dev/blog/randv2
"non-main files":
files:
- "!**/main.go"
deny:
- pkg: log$
desc: Use log/slog instead, see https://go.dev/blog/slog
# "non-main files":
# files:
# - "!**/main.go"
# deny:
# - pkg: log$
# desc: Use log/slog instead, see https://go.dev/blog/slog
embeddedstructfieldcheck:
# Checks that sync.Mutex and sync.RWMutex are not used as embedded fields.
@@ -335,7 +335,7 @@ linters:
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
strict: false
inamedparam:
# Skips check for interface methods with only a single parameter.