[#1718] linter: Enable gocritic linter
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m11s
Pre-commit hooks / Pre-commit (push) Successful in 1m35s
Build / Build Components (push) Successful in 1m41s
Tests and linters / gopls check (push) Successful in 3m45s
Tests and linters / Run gofumpt (push) Successful in 4m20s
OCI image / Build container images (push) Successful in 4m33s
Tests and linters / Lint (push) Successful in 5m5s
Tests and linters / Staticcheck (push) Successful in 5m5s
Tests and linters / Tests (push) Successful in 5m29s
Tests and linters / Tests with -race (push) Successful in 5m55s

See https://go-critic.com/overview#checkers-from-the-diagnostic-group for
list of default enabled checkers.
`ifElseChain` disabled as it generates doubtful issues.

Change-Id: I5937b116d9af8b3cdf8b06451c4904d0b3f67f68
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2025-04-16 14:47:32 +03:00
parent ca8b01667f
commit 3cbff57535
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0

View file

@ -18,6 +18,7 @@ linters:
- exhaustive - exhaustive
- funlen - funlen
- gocognit - gocognit
- gocritic
- godot - godot
- importas - importas
- ineffassign - ineffassign
@ -44,6 +45,9 @@ linters:
statements: 60 statements: 60
gocognit: gocognit:
min-complexity: 40 min-complexity: 40
gocritic:
disabled-checks:
- ifElseChain
importas: importas:
alias: alias:
- pkg: git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object - pkg: git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object