diff --git a/doc/data/messages/s/suppressed-message/bad.py b/doc/data/messages/s/suppressed-message/bad.py new file mode 100644 index 0000000000..5b4c437acf --- /dev/null +++ b/doc/data/messages/s/suppressed-message/bad.py @@ -0,0 +1,9 @@ +### This is a contrived example, to show how suppressed-message works. +### First we enable all messages +# pylint: enable=all + +### Here we disable two messages so we get two warnings +# pylint: disable=locally-disabled, useless-suppression # [suppressed-message, suppressed-message] + +### Here we disable a message, so we get a warning for suppressed-message again. +"A" # pylint: disable=pointless-statement # [suppressed-message, suppressed-message] diff --git a/doc/data/messages/s/suppressed-message/details.rst b/doc/data/messages/s/suppressed-message/details.rst index ab82045295..ceb0ba72cf 100644 --- a/doc/data/messages/s/suppressed-message/details.rst +++ b/doc/data/messages/s/suppressed-message/details.rst @@ -1 +1,4 @@ -You can help us make the doc better `by contributing `_ ! +``suppressed-message`` is simply a way to see messages that would be raised +without the disable in your codebase. It should not be activated most +of the time. See also ``useless-suppression`` if you want to see the message +that are disabled for no reasons. diff --git a/doc/data/messages/s/suppressed-message/good.py b/doc/data/messages/s/suppressed-message/good.py index c40beb573f..39c3624803 100644 --- a/doc/data/messages/s/suppressed-message/good.py +++ b/doc/data/messages/s/suppressed-message/good.py @@ -1 +1 @@ -# This is a placeholder for correct code for this message. +"""Instead of a single string somewhere in the file, write a module docstring!"""