Skip to content

lint: Use golangci-lint for license check#1157

Merged
JacobOaks merged 3 commits intouber-go:masterfrom
abhinav:golangci-license-int
Feb 12, 2024
Merged

lint: Use golangci-lint for license check#1157
JacobOaks merged 3 commits intouber-go:masterfrom
abhinav:golangci-license-int

Conversation

@abhinav
Copy link
Collaborator

@abhinav abhinav commented Feb 11, 2024

Instead of a hand-written license header check,
use the goheader linter included in golangci-lint.

Also deletes a stale exclude-rules in golangci.yml
that was copied over from Zap.

Instead of a hand-written license header check,
use the goheader linter included in golangci-lint.

Also deletes a stale exclude-rules in golangci.yml
that was copied over from Zap.
abhinav added a commit to abhinav/dig that referenced this pull request Feb 11, 2024
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
Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4c7a22b) 98.74% compared to head (30d0a89) 98.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1157   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files          30       30           
  Lines        2950     2950           
=======================================
  Hits         2913     2913           
  Misses         30       30           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sounds like we accidentally added a typo in the license headers
for these files.
@JacobOaks JacobOaks merged commit ecc5bc7 into uber-go:master Feb 12, 2024
@abhinav abhinav deleted the golangci-license-int branch February 12, 2024 20:49
JacobOaks pushed a commit to uber-go/dig that referenced this pull request Feb 13, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants