summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDudeNr33 <3929834+DudeNr33@users.noreply.github.com>2021-04-03 14:10:39 +0200
committerGitHub <noreply@github.com>2021-04-03 14:10:39 +0200
commitf5e0968d6be95ae1bf9608e6bab6afcb8aa54663 (patch)
tree196efc91e240f08cd05438ee767434dde45a8b8d
parentcab9b08737ed7aad2a08ce90718c67155fa5c4a0 (diff)
downloadpylint-git-f5e0968d6be95ae1bf9608e6bab6afcb8aa54663.tar.gz
Extend documentation for issue #4282 (#4288)
* Extend documentation for https://github.com/PyCQA/pylint/issues/4282: Explain connection between --output-format and --msg-template. Document which command line options are implicitly set through epylint.py_run Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--doc/user_guide/output.rst2
-rw-r--r--doc/user_guide/run.rst9
3 files changed, 13 insertions, 0 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 8ace48a72..c6162a235 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -466,3 +466,5 @@ contributors:
* Andrew Howe: contributor
* James Sinclair (irgeek): contributor
+
+* Andreas Finkler: contributor
diff --git a/doc/user_guide/output.rst b/doc/user_guide/output.rst
index 30d3dfc6e..b329d3057 100644
--- a/doc/user_guide/output.rst
+++ b/doc/user_guide/output.rst
@@ -51,6 +51,8 @@ A few other examples:
{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
+The ``--msg-template`` option can only be combined with text-based reporters (``--output-format`` either unspecified or one of: parseable, colorized or msvs).
+If both ``--output-format`` and ``--msg-template`` are specified, the ``--msg-template`` option will take precedence over the default line format defined by the reporter class.
.. _Python new format syntax: https://docs.python.org/2/library/string.html#formatstrings
diff --git a/doc/user_guide/run.rst b/doc/user_guide/run.rst
index 971ae801d..43e6e2113 100644
--- a/doc/user_guide/run.rst
+++ b/doc/user_guide/run.rst
@@ -53,6 +53,15 @@ and get its standard output and error:
from pylint import epylint as lint
(pylint_stdout, pylint_stderr) = lint.py_run('module_name.py', return_std=True)
+It is also possible to include additional Pylint options in the first argument to ``py_run``:
+
+.. sourcecode:: python
+
+ from pylint import epylint as lint
+ (pylint_stdout, pylint_stderr) = lint.py_run('module_name.py --disable C0114', return_std=True)
+
+The options ``--msg-template="{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}"`` and
+``--reports=n`` are set implicitly inside the ``epylint`` module.
Command line options
--------------------