uber-go / dig

A reflection based dependency injection toolkit for Go.
https://go.uber.org/dig
MIT License
3.88k stars 206 forks source link

ci: Use golangci-lint #406

Closed abhinav closed 7 months ago

abhinav commented 7 months ago

This PR switches to using golangci-lint to run linters. staticcheck is included and enabled by default. We add revive and a few others. All issues reported by the linters have been fixed.

This also allows the linter to run in parallel with the tests.

License header check has also been moved to golangci-lint, similarly to uber-go/fx#1157.

Refs uber-go/fx#1150 Refs uber-go/zap#1323

codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (612c6c0) 98.40% compared to head (7542542) 98.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #406 +/- ## ======================================= Coverage 98.40% 98.40% ======================================= Files 22 22 Lines 1507 1507 ======================================= Hits 1483 1483 Misses 15 15 Partials 9 9 ```

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