Exit with 0 when -fix is enabled and the files to lint only contain fixable issuesΒ #430
Open
Description
Hi! Thanks for working on this tool :)
Currently, protolint exits with 1
if it runs with the -fix
option (protolint lint -fix
) against files that only have fixable issues.
Would it be possible to exit with 0
in this case? Otherwise, it's impossible to distinguish between the following cases when running protolint lint -fix
:
- Protolint found issues for rules that don't support fix mode
- Protolint found issues that were automatically fixed
Other linters and formatters implement this behavior, and it would be useful to implement automated workflows that aim at automating fixes for rules that support that.
If possible, I would suggest implementing this with an option that only if provided, enables this behavior to avoid making this change breaking.
Thanks!