Skip to content

Commit

Permalink
Ref #10260 -- Add documentation for the github output format (#10272) (
Browse files Browse the repository at this point in the history
…#10273)

(cherry picked from commit 5f26f32)

Co-authored-by: Johannes Maron <[email protected]>
  • Loading branch information
github-actions[bot] and codingjoe authored Mar 10, 2025
1 parent 6b68f91 commit f28d768
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/user_guide/configuration/all-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Standard Checkers

--output-format
"""""""""""""""
*Set the output format. Available formats are: text, parseable, colorized, json2 (improved json format), json (old json format) and msvs (visual studio). You can also give a reporter class, e.g. mypackage.mymodule.MyReporterClass.*
*Set the output format. Available formats are: 'text', 'parseable', 'colorized', 'json2' (improved json format), 'json' (old json format), msvs (visual studio) and 'github' (GitHub actions). You can also give a reporter class, e.g. mypackage.mymodule.MyReporterClass.*

**Default:** ``text``

Expand Down
11 changes: 9 additions & 2 deletions doc/user_guide/usage/output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ Output by default is written to stdout. The simplest way to output to a file is
with the ``--output=<filename>`` option.

The default format for the output is raw text. You can change this by passing
pylint the ``--output-format=<value>`` option. Possible values are: ``text``, ``json``,
``parseable``, ``colorized`` and ``msvs`` (for Visual Studio).
pylint the ``--output-format=<value>`` option. Possible values are:

* ``text``
* ``parseable``
* ``colorized``
* ``json2``: improved json format
* ``json``: old json format
* ``msvs``: visual studio
* ``github``: `GitHub action messages <https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions>`_

Multiple output formats can be used at the same time by passing
a comma-separated list of formats to ``--output-format``.
Expand Down
6 changes: 3 additions & 3 deletions pylint/lint/base_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def _make_linter_options(linter: PyLinter) -> Options:
"metavar": "<format>",
"short": "f",
"group": "Reports",
"help": "Set the output format. Available formats are: text, "
"parseable, colorized, json2 (improved json format), json "
"(old json format) and msvs (visual studio). "
"help": "Set the output format. Available formats are: 'text', "
"'parseable', 'colorized', 'json2' (improved json format), 'json' "
"(old json format), msvs (visual studio) and 'github' (GitHub actions). "
"You can also give a reporter class, e.g. mypackage.mymodule."
"MyReporterClass.",
"kwargs": {"linter": linter},
Expand Down

0 comments on commit f28d768

Please sign in to comment.