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

Can revive only report problems on git changes? #42

Closed
jsedgwick opened this issue Jul 19, 2018 · 2 comments
Closed

Can revive only report problems on git changes? #42

jsedgwick opened this issue Jul 19, 2018 · 2 comments

Comments

@jsedgwick
Copy link

This would be essential to usage with github checks API and pre-hook linters

My organization would like to use revive instead of golangci-lint (mostly because of extensibility) but I cannot tell if revive has this feature. It is best described through this quote from golangci-lint docs

Integration into large codebases. A good way to start using linters in a large project is not to fix a plethora of existing issues, but to set up CI and fix only issues in new commits. You can use revgrep for it, but it's yet another utility to install and configure. With golangci-lint it's much easier: revgrep is already built into golangci-lint and you can use it with one option (-n, --new or --new-from-rev).

source: https://github.com/golangci/golangci-lint#golangci-lint-vs-gometalinter

@mgechev
Copy link
Owner

mgechev commented Jul 19, 2018

Just like with gometalinter, golint, govet, etc., revive works with revgrep:

revive dir/... | revgrep master

revive's default formatter prints the warnings in the same format, like the traditional linters so revgrep will be able to parse the output.

I don't think adding revgrep as part of revive will be feasible, I'd prefer to keep it as an external tool.

@mgechev mgechev closed this as completed Jul 19, 2018
@jsedgwick
Copy link
Author

OK. Thank you! Look forward to potentially using this

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