-
Notifications
You must be signed in to change notification settings - Fork 13
chore: update golangci-lint to v2.3.0 [IDE-1377] #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Migrate stylecheck, gosimple, and varcheck into staticcheck (they are now combined). Add unused linter with `exported-fields-are-used: false` to replace varcheck's `exported-fields: true`. Enable staticcheck explicitly, it was previously enabled, but was not listed. Remove deprecated `EXC####` exclusion rules. Disable package comment rules (ST1000). Disable naming convention rules (ST1003). Move the timeout to command-line arguments (v2 discourages timeouts in the config). Re-enable stuttering checks. Fix or ignore any new lint errors. Improve updating of golangci-lint, now will be automatically updated if needed before use.
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
Please make sure that the changes in error handling don't change the CLI behaviour. Please open a CLI PR with the changes to ensure the tests run. Thank you! |
@PeterSchafer I can confirm that in a branch with all 3 repos changes, it does still pass the CLI's CI, other than security checks (not from my changes and no fix for the CVE is out) and an acceptance test which is failing due to brew dependency changes. CI run here. |
This is a best practice to not rely on the golangci-lint install script to do it.
Migrate stylecheck, gosimple, and varcheck into staticcheck (they are now combined).
Add unused linter with
exported-fields-are-used: false
to replace varcheck'sexported-fields: true
.Enable staticcheck explicitly, it was previously enabled, but was not listed.
Remove deprecated
EXC####
exclusion rules.Disable package comment rules (ST1000).
Disable naming convention rules (ST1003).
Move the timeout to command-line arguments (v2 discourages timeouts in the config).
Re-enable stuttering checks.
Fix or ignore any new lint errors.
Improve updating of golangci-lint, now will be automatically updated if needed before use.
Notes for the reviewer
I would recommend comparing
.golangci.yaml
with whitespace ignored.Migration guide: https://golangci-lint.run/docs/product/migration-guide/