diff --git a/docs/source/exit_codes.rst b/docs/source/exit_codes.rst new file mode 100644 index 000000000000..01cc08113254 --- /dev/null +++ b/docs/source/exit_codes.rst @@ -0,0 +1,20 @@ +.. _exit-codes: + +Exit codes +=========== + +Mypy, like all programs, returns an +`exit code `_ to the process or shell +that invokes it. The meaning of these codes is thus: + +* 0: no type errors + +* 1: there are some type errors + +* 2: a crash, bad arguments or configuration, and other non-standard conditions relating to mypy + +There is currently `a bug `_ +in which certain configuration errors will result in an exit code of 0 instead +of 2. + +Note: the exit code is completely unrelated to mypy-internal :ref:`error-codes`. diff --git a/docs/source/index.rst b/docs/source/index.rst index de3286d58ace..ab11c1a1c077 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -101,6 +101,7 @@ Contents error_codes error_code_list error_code_list2 + exit_codes additional_features faq changelog