From bc6ad525d46be1c9783ab939745de2e32be74970 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 26 Apr 2026 09:42:30 +0200 Subject: [PATCH 1/2] Add CI check that generated documentation is up to date The Sphinx extensions in doc/exts/ regenerate tracked .rst files on every build, but a clean Sphinx build was not enough to flag drift in the committed copies. Run 'git diff --exit-code' after 'tox -e docs' so PRs that change checker messages or options must include the regenerated docs. --- .github/workflows/checks.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index b309947c53..87954651c3 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -158,3 +158,9 @@ jobs: echo "Make sure that 'tox -e docs' succeed without any modifications locally." ; \ exit 1; \ } + - name: Check that generated documentation is up to date + run: | + if ! git diff --exit-code; then + echo "::error::Generated documentation is out of date. Run 'tox -e docs' locally and commit the changes." + exit 1 + fi From c86eabf9334d006bd4b912dd29fa9dcb7c192bfc Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 26 Apr 2026 09:36:56 +0200 Subject: [PATCH 2/2] Upgrade the doc to the latest generation --- doc/user_guide/checkers/extensions.rst | 2 +- doc/user_guide/configuration/all-options.rst | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/user_guide/checkers/extensions.rst b/doc/user_guide/checkers/extensions.rst index c9dead7ca3..d2555d7dd7 100644 --- a/doc/user_guide/checkers/extensions.rst +++ b/doc/user_guide/checkers/extensions.rst @@ -270,7 +270,7 @@ Verbatim name of the checker is ``dict-init-mutate``. Dict-Init-Mutate checker Messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:dict-init-mutate (C3401): *Declare all known key/values when initializing the dictionary.* +:dict-init-mutate (C3401): *Declare all known key/values when initializing the dictionary: %s* Dictionaries can be initialized with a single statement using dictionary literal syntax. diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst index ede03b6f0e..0c273348ed 100644 --- a/doc/user_guide/configuration/all-options.rst +++ b/doc/user_guide/configuration/all-options.rst @@ -8,7 +8,6 @@ Standard Checkers ^^^^^^^^^^^^^^^^^ -Remember that only ``tool.pylint`` is required, the section title is not. There are specific notes under each example that cover this. .. _main-options: @@ -91,6 +90,13 @@ Remember that only ``tool.pylint`` is required, the section title is not. There **Default:** ``10`` +--files +""""""" +*The files to lint. The flag can also be omitted as pylint will try to lint any file passed as argument. This can be used to set files to a directory in a configuration file and invoke pylint by only typing pylint on the command line. Any file passed as argument will overwrite any file set in the configuration file.* + +**Default:** ``[]`` + + --from-stdin """""""""""" *Interpret the stdin as a python script, whose filename needs to be passed as the module_or_package argument.* @@ -250,6 +256,8 @@ Remember that only ``tool.pylint`` is required, the section title is not. There fail-under = 10 + files = [] + from-stdin = false ignore = ["CVS"]