Exit codes
The ty command line interface uses the following exit codes:
| Exit code | Description |
|---|---|
0 |
no violations with severity warning or higher were found |
1 |
violations with severity warning or higher were found |
2 |
invalid CLI options, invalid configuration, or IO errors |
101 |
internal error |
ty supports three command line arguments that change how exit codes work:
--exit-zero: ty will exit with0even if violations were found.--error-on-warning: ty will exit with1if it finds any violations with severitywarningor higher.--exit-zero-on-warning: ty will only exit with1if it finds violations with severityerroror higher.
--error-on-warning cannot be supplied at the same time as --exit-zero or --exit-zero-on-warning.