How to disable all QF staticcheck in golangci-lint? #6138
-
after we migrated golangci-lint to version 2, there are lots of staticcheck errors about quickfix? Can we directly disable all QF static checks in golangci-lint.yml? |
Beta Was this translation helpful? Give feedback.
Answered by
alexandear
Oct 17, 2025
Replies: 1 comment
-
Yes, we can disable quickfix checks by using version: "2"
linters:
enable:
- staticcheck
settings:
staticcheck:
checks:
- all
- -QF* See https://staticcheck.dev/docs/configuration/options/#checks. Live example: https://github.com/rclone/rclone/blob/1903b4c1a27e4810b2fe2d75c89c06bd17bb34ac/.golangci.yml#L35 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ldez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, we can disable quickfix checks by using
-QF*
.See https://staticcheck.dev/docs/configuration/options/#checks.
Live example: https://github.com/rclone/rclone/blob/1903b4c1a27e4810b2fe2d75c89c06bd17bb34ac/.golangci.yml#L35