From c2bcd0b465587ea9e5bbcc374b09b3906821a0fa Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 4 Sep 2023 08:57:20 +0200 Subject: [PATCH] [doc] Document some internal pylint errors and configuration/option error (#8992) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bad-plugin-value] Initial documentation Refs #7897 * [unrecognized-option] Initial documentation Refs #7897 * [raw-checker-failed] Create the initial documentation Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> --- doc/data/messages/b/bad-plugin-value/details.rst | 15 ++++++++++++++- doc/data/messages/b/bad-plugin-value/good.py | 1 - .../messages/r/raw-checker-failed/details.rst | 3 ++- doc/data/messages/r/raw-checker-failed/good.py | 1 - .../messages/u/unrecognized-option/details.rst | 16 +++++++++++++++- doc/data/messages/u/unrecognized-option/good.py | 1 - 6 files changed, 31 insertions(+), 6 deletions(-) delete mode 100644 doc/data/messages/b/bad-plugin-value/good.py delete mode 100644 doc/data/messages/r/raw-checker-failed/good.py delete mode 100644 doc/data/messages/u/unrecognized-option/good.py diff --git a/doc/data/messages/b/bad-plugin-value/details.rst b/doc/data/messages/b/bad-plugin-value/details.rst index c1e9b976ac..5beb0bdef6 100644 --- a/doc/data/messages/b/bad-plugin-value/details.rst +++ b/doc/data/messages/b/bad-plugin-value/details.rst @@ -1 +1,14 @@ -You can help us make the doc better `by contributing `_ ! +One of your pylint plugins cannot be loaded. There's nothing to change in +your code, but your pylint configuration or installation has an issue. + +For example, there might be a typo. The following config:: + + [MAIN] + load-plugins = pylint.extensions.bad_biultin + +Should be:: + + [MAIN] + load-plugins = pylint.extensions.bad_builtin + +Or the plugin you added is not importable in your environment. diff --git a/doc/data/messages/b/bad-plugin-value/good.py b/doc/data/messages/b/bad-plugin-value/good.py deleted file mode 100644 index c40beb573f..0000000000 --- a/doc/data/messages/b/bad-plugin-value/good.py +++ /dev/null @@ -1 +0,0 @@ -# This is a placeholder for correct code for this message. diff --git a/doc/data/messages/r/raw-checker-failed/details.rst b/doc/data/messages/r/raw-checker-failed/details.rst index c1e9b976ac..ce18fd841b 100644 --- a/doc/data/messages/r/raw-checker-failed/details.rst +++ b/doc/data/messages/r/raw-checker-failed/details.rst @@ -1 +1,2 @@ -You can help us make the doc better `by contributing `_ ! +This warns you that a builtin module was impossible to analyse (an ast node is not pure python). +There's nothing to change in your code, this is a warning about astroid and pylint's limitations. diff --git a/doc/data/messages/r/raw-checker-failed/good.py b/doc/data/messages/r/raw-checker-failed/good.py deleted file mode 100644 index c40beb573f..0000000000 --- a/doc/data/messages/r/raw-checker-failed/good.py +++ /dev/null @@ -1 +0,0 @@ -# This is a placeholder for correct code for this message. diff --git a/doc/data/messages/u/unrecognized-option/details.rst b/doc/data/messages/u/unrecognized-option/details.rst index c1e9b976ac..6644085778 100644 --- a/doc/data/messages/u/unrecognized-option/details.rst +++ b/doc/data/messages/u/unrecognized-option/details.rst @@ -1 +1,15 @@ -You can help us make the doc better `by contributing `_ ! +One of your options is not recognized. There's nothing to change in +your code, but your pylint configuration or the way you launch +pylint needs to be modified. + +For example you might be launching pylint with the following ``toml`` configuration:: + + [tool.pylint] + jars = "10" + +When the following should be used:: + + [tool.pylint] + jobs = "10" + +This warning was released in pylint 2.14: bad options were silently failing before. diff --git a/doc/data/messages/u/unrecognized-option/good.py b/doc/data/messages/u/unrecognized-option/good.py deleted file mode 100644 index c40beb573f..0000000000 --- a/doc/data/messages/u/unrecognized-option/good.py +++ /dev/null @@ -1 +0,0 @@ -# This is a placeholder for correct code for this message.