From 4427cf3cdde5d2490a7498a4b9d80dfc96724fa1 Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Sat, 7 Oct 2023 23:31:15 +0300 Subject: [PATCH] Documentation for https://github.com/pylint-dev/pylint/issues/3995 Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- doc/user_guide/usage/output.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/user_guide/usage/output.rst b/doc/user_guide/usage/output.rst index 50a7fa76e4..0de49a0cb3 100644 --- a/doc/user_guide/usage/output.rst +++ b/doc/user_guide/usage/output.rst @@ -21,6 +21,19 @@ a colorized report to stdout at the same time: --output-format=json:somefile.json,colorized +Environment Variables +'''''''''''''''''''''''''''' +The colorization of the output can also be controlled through environment +variables. The precedence for determining output format is as follows: + +1. ``NO_COLOR`` +2. ``FORCE_COLOR``, or ``PY_COLORS`` +3. ``--output-format=...`` + +Setting ``NO_COLOR`` (to any value) will disable colorized output, while +``FORCE_COLOR`` or ``PY_COLORS`` (to any value) will enable it, overriding +the ``--output-format`` option if specified. + Custom message formats ''''''''''''''''''''''