rickstaa / action-black

Runs the psf/black formatter to check/format your python code.
https://github.com/marketplace/actions/run-black-formatter
MIT License
39 stars 13 forks source link

Black exit codes reference #1

Closed rickstaa closed 3 years ago

rickstaa commented 3 years ago

Here a small exit codes overview that can be used during the action development.

Black exit codes

Exit codes without formatting

Error type Exit code
Linting errors found 1
No linting errors found 0
Input argument error 2
Internal error (e.g. python syntax error) 123

Exit codes with formatting

Error type Exit code
Formatting not needed 0
Formatting successful 0
Input argument error 2
Internal error (e.g. python syntax error) 123

Stderr/stdout behavoir

Black writes the logs and errors to the stderr. The diff output is written to the stdout.