Skip to content

Conversation

rrama
Copy link
Contributor

@rrama rrama commented Sep 8, 2025

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.

Notes for the reviewer

I would recommend comparing .golangci.yaml with whitespace ignored.
Migration guide: https://golangci-lint.run/docs/product/migration-guide/

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.
Copy link

snyk-io bot commented Sep 8, 2025

🎉 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)

Copy link

snyk-io bot commented Sep 8, 2025

🎉 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)

@rrama rrama marked this pull request as ready for review September 11, 2025 10:13
@rrama rrama requested review from a team as code owners September 11, 2025 10:13
@PeterSchafer
Copy link
Contributor

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!

@rrama
Copy link
Contributor Author

rrama commented Sep 15, 2025

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants