google / osv-scanner

Vulnerability scanner written in Go which uses the data provided by https://osv.dev
https://google.github.io/osv-scanner/
Apache License 2.0
6.15k stars 347 forks source link

refactor: enable `revive/indent-error-flow` #997

Closed G-Rath closed 3 months ago

G-Rath commented 4 months ago

This enables the indent-error-flow rule from revive, which flags redundant else statements.


It turns out that by configuring revive, we actually inadvertently disabled all of its rules, and there are a few we're failing on that I think are worth re-enabling - this is one of them

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 62.96296% with 10 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@46aee59). Learn more about missing BASE report.

Files Patch % Lines
internal/image/extractor.go 0.00% 3 Missing :warning:
internal/thirdparty/ar/reader.go 0.00% 3 Missing :warning:
internal/customgitignore/walk_up_to_root.go 71.42% 1 Missing and 1 partial :warning:
internal/sbom/cyclonedx.go 0.00% 1 Missing :warning:
pkg/osv/osv.go 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #997 +/- ## ======================================= Coverage ? 65.31% ======================================= Files ? 150 Lines ? 12519 Branches ? 0 ======================================= Hits ? 8177 Misses ? 3882 Partials ? 460 ```

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