osv-scanner icon indicating copy to clipboard operation
osv-scanner copied to clipboard

chore: upgrade `golangci-lint` to v2

Open G-Rath opened this issue 7 months ago • 3 comments

The new major primarily was focused on overhauling the config structure along with introducing the concept of formatters as being different from linters, though it also seems to have super charged staticcheck as that has a number of new findings mainly around being able to remove embedded fields.

For now I have disabled the failing checks and will look to review + tackle them in follow up PRs

Also see the migration guide for details on the changes

G-Rath avatar Apr 03 '25 20:04 G-Rath

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 65.18%. Comparing base (d226688) to head (3fc708d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1781   +/-   ##
=======================================
  Coverage   65.18%   65.18%           
=======================================
  Files         164      164           
  Lines       15862    15862           
=======================================
  Hits        10339    10339           
  Misses       4855     4855           
  Partials      668      668           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Apr 03 '25 20:04 codecov-commenter

Actually I just realised the "new" staticcheck violations are because v2 does not have "false positives" overrides, so most if not all of these new violations are from these

G-Rath avatar Apr 03 '25 20:04 G-Rath

The linter check is currently failing due to https://github.com/golangci/golangci-lint/pull/5692

G-Rath avatar Apr 04 '25 02:04 G-Rath