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

Make linter facter by enabling bazel nogo to implement fast incremental linter #35345

Closed
7 tasks done
hawkingrei opened this issue Jun 13, 2022 · 5 comments · Fixed by #35670 or #36927
Closed
7 tasks done

Make linter facter by enabling bazel nogo to implement fast incremental linter #35345

hawkingrei opened this issue Jun 13, 2022 · 5 comments · Fixed by #35670 or #36927
Assignees

Comments

@hawkingrei
Copy link
Member

hawkingrei commented Jun 13, 2022

Enhancement

nogo build-time code analysis

nogo is a tool that analyzes the source code of Go programs. It runs alongside the Go compiler in the Bazel Go rules and rejects programs that contain disallowed coding patterns. In addition, nogo may report compiler-like errors.

nogo is a powerful tool for preventing bugs and code anti-patterns early in the development process. It may be used to run the same analyses as vet, and you can write new analyses for your own code base.

@hawkingrei hawkingrei changed the title enable bazel nogo to implement fast incremental linter make linter facter: enable bazel nogo to implement fast incremental linter Jun 15, 2022
@tisonkun
Copy link
Contributor

Could you add a link to nogo and try to prepare a table comparing nogo and govet, pros and cons?

@hawkingrei
Copy link
Member Author

Could you add a link to nogo and try to prepare a table comparing nogo and govet, pros and cons?

This document is about nogo

@hawkingrei
Copy link
Member Author

Could you add a link to nogo and try to prepare a table comparing nogo and govet, pros and cons?

I think the advantage of nogo is that it has a good mechanism to get cache results and share the cache anywhere. the disadvantage of it is that it makes a person manage the linter by code. here is an example from cockroach. and this is a library to do it.

@hawkingrei
Copy link
Member Author

BTW, I have a plan to use Bazel nogo and golang.Ast to check the problem that RecordSet is not closed in the test like #35373.

@hawkingrei hawkingrei self-assigned this Jun 15, 2022
ti-chi-bot pushed a commit that referenced this issue Jun 23, 2022
@hawkingrei hawkingrei reopened this Jun 23, 2022
ti-chi-bot pushed a commit that referenced this issue Jun 23, 2022
This was referenced Jun 23, 2022
ti-chi-bot pushed a commit that referenced this issue Jun 24, 2022
This was referenced Jun 27, 2022
ti-chi-bot pushed a commit that referenced this issue Jun 29, 2022
@hawkingrei hawkingrei mentioned this issue Jun 29, 2022
12 tasks
ti-chi-bot pushed a commit that referenced this issue Jun 29, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 2, 2022
This was referenced Jul 3, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 4, 2022
ti-chi-bot pushed a commit that referenced this issue Jul 4, 2022
@hawkingrei hawkingrei mentioned this issue Jul 5, 2022
4 tasks
ti-chi-bot pushed a commit that referenced this issue Jul 5, 2022
@hawkingrei hawkingrei mentioned this issue Jul 7, 2022
12 tasks
ti-chi-bot pushed a commit that referenced this issue Jul 15, 2022
@hawkingrei hawkingrei mentioned this issue Aug 5, 2022
1 task
ti-chi-bot pushed a commit that referenced this issue Aug 5, 2022
@hawkingrei hawkingrei reopened this Aug 7, 2022
ti-chi-bot pushed a commit that referenced this issue Aug 8, 2022
@hawkingrei
Copy link
Member Author

We have removed golangci-linter in the CI. The performance of the linter has sped up 10x. We can close this issue.

@tisonkun tisonkun changed the title make linter facter: enable bazel nogo to implement fast incremental linter Make linter facter by enabling bazel nogo to implement fast incremental linter Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants