Exit code 1 for warnings (warning vs error handling)
It would be nice if the handling around warnings and errors was more configurable ie --errors-only or --warnings-as-errors=true/false. Right now it returns an exit code 1 when there is just warnings which is treating warnings as errors. A flag would be nice.
I think we report all violations as warnings:
https://github.com/sbdchd/squawk/blob/6437c3ca743d07f3c7ce8ebe49240b2c5aa65c1c/cli/src/reporter.rs#L393-L402
Maybe we could mimic eslint's exit codes.
- no violations: exit 0
- violations: exit 1
- internal error (parsing error, some unknown error): exit 2
Strong agree here. Especially if you are doing something like this in your CI run this causes builds to fail. The easy option here is another CLI flag to enable warnings to fail with a non-zero exit code.