-
Notifications
You must be signed in to change notification settings - Fork 289
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
Is it possible for revive to return a non-zero exit code when there are issues and zero if not? #241
Comments
Hi @inliquid, in the configuration you can set For example with
|
@inliquid I'm closing the issue. Feel free to comment/open a new issue in case we misunderstood you. |
The above example overwrites also the linter configuration, so having a file with just that content also disables all the linters. Is there a way to say: "lint as usual and per default but exit 1 if there was a problem"? |
@jan-xyz the above example is NOT a full configuration, just the lines you need to modify in order to get error codes when the linter finds issues. |
I understand that. Before I was running revive without a config though, now by adding the exit codes I need to specify a full config, and I am curious if the list of linter default rules will change in the future and I will miss those new rules? |
I get your point @jan-xyz. |
That would be my favorite solution 🤗 I would also offer to provide the PR for it, if you are ok with adding it |
PRs are welcome! |
I filed #589 , let me know what you think 🤗 |
Note: You can use `golangci-lint config verify` to check if the `.golangci.yml` config matches the published schema. - `tenv` has been deprecated in favour of `usetesting` - `allow-leading-space` has been removed from `nolintlint`: golangci/golangci-lint#3063 - `revive` doesn't have `error-code` `warning-code` as config options (see https://golangci-lint.run/usage/linters/#revive). There's some discussion mgechev/revive#241 about adding `set_exit_status` to `revive`, but it's not exposed via `golangci-lint` Signed-off-by: Mihai Todor <todormihai@gmail.com>
I'd like to run
revive
in some sort of automated test during build. However I found that it returns zero in any case. This makes it more complicated to check result of running the tool.The text was updated successfully, but these errors were encountered: