Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move "vet" checks from golangci-lint to nogo #9671

Merged
merged 4 commits into from Jan 24, 2024
Merged

Conversation

jrockway
Copy link
Member

@jrockway jrockway commented Jan 23, 2024

Nogo is rules_go's way of linting go code. It runs during compilation, and only during compilation. This means that lint results are cached along with compiled libraries, so if a library isn't being compiled, you don't have to spend time linting it.

Moving govet is the easiest linter. I plan to gradually chip away at everything that golangci-lint does, but for now, we're just getting the simplest one.

(Additionally, this makes bazel builds behave more like go builds. Go runs vet whenever you request a test, and won't run the test if vet fails. This doesn't happen with Bazel, but golangci-lint would have gotten it. Now it works again, and also affects non-test targets, which I think is helpful.)

We also gain the ability to write our own lint rules: https://github.com/bazelbuild/rules_go/blob/master/go/nogo.rst#writing-and-registering-analyzers

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fe35f29) 58.72% compared to head (b39f610) 58.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9671      +/-   ##
==========================================
+ Coverage   58.72%   58.95%   +0.23%     
==========================================
  Files         582      582              
  Lines       71045    71045              
==========================================
+ Hits        41720    41884     +164     
+ Misses      28708    28534     -174     
- Partials      617      627      +10     

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

@jrockway jrockway merged commit a5435bf into master Jan 24, 2024
21 checks passed
@jrockway jrockway deleted the jonathan/nogo2 branch January 24, 2024 21:14
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.

None yet

2 participants