Skip to content

Ref #10260 -- Add documentation for the github output format #10272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading