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

[refactor] build on top of golang.org/x/tools/go/analysis #5

Open
chrsm opened this issue Mar 1, 2020 · 4 comments
Open

[refactor] build on top of golang.org/x/tools/go/analysis #5

chrsm opened this issue Mar 1, 2020 · 4 comments

Comments

@chrsm
Copy link
Collaborator

chrsm commented Mar 1, 2020

So far we've implemented our lint rules manually - and a frontend to match.

The analysis package implements numerous checkers that serve as great examples - and ways to run them (and custom ones) via the analysis/multichecker and analysis/singlechecker packages.

Instead of rolling our own, we should attempt to use this interface.

@chrsm
Copy link
Collaborator Author

chrsm commented Mar 2, 2020

Working on this in chrsm/go-analysis

@chrsm
Copy link
Collaborator Author

chrsm commented Mar 2, 2020

It looks like we'll need to write a tiny frontend similar to analysis/multichecker to support our yaml-based config format. This shouldn't be too challenging, as all cmd/openlynt does is parse the yaml and run ast.Inspect.

@toejough
Copy link

toejough commented Mar 2, 2020

after the refactor we can follow the example at https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/govet.go if we ever want to submit a PR for integration with golangci-lint

@chrsm
Copy link
Collaborator Author

chrsm commented Mar 2, 2020

👍 it'd be pretty awesome to get ours in there!

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

No branches or pull requests

2 participants