Skip to content

Commit

Permalink
[doc] Add caution about fail-on on informational messages
Browse files Browse the repository at this point in the history
Closes #9171
  • Loading branch information
Pierre-Sassoulas committed Oct 30, 2023
1 parent 9ec011f commit 971fcf4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/exts/pylint_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ def _generate_single_message_body(message: MessageData) -> str:
.. caution::
This message is disabled by default. To enable it, add ``{message.name}`` to the ``enable`` option.
"""
if message.id.startswith("I"):
body += f"""
.. caution::
By default, this message will not fail the execution (pylint will return 0).
To make pylint fail for this message use the ``--fail-on={message.id}`` option
or ``--fail-on=I`` to fail on all enabled informational messages.
"""

body += "\n" + message.example_code + "\n"
Expand Down

0 comments on commit 971fcf4

Please sign in to comment.