summaryrefslogtreecommitdiff
path: root/doc/user_guide
diff options
context:
space:
mode:
authorZen Lee <53538590+zenlyj@users.noreply.github.com>2023-02-27 04:21:34 +0800
committerGitHub <noreply@github.com>2023-02-26 21:21:34 +0100
commit52a2a04a59526ce8344d4d2b7f86bb978177e047 (patch)
treed8e9053d8eca4c9eb1cce97173ef5d3a065cb750 /doc/user_guide
parent27a3984832faf36be4fab07fef84086d25283846 (diff)
downloadpylint-git-52a2a04a59526ce8344d4d2b7f86bb978177e047.tar.gz
Add new checker `bad-chained-comparison` (#7990)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'doc/user_guide')
-rw-r--r--doc/user_guide/checkers/features.rst13
-rw-r--r--doc/user_guide/messages/messages_overview.rst1
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst
index ac17fabb6..d5bceae57 100644
--- a/doc/user_guide/checkers/features.rst
+++ b/doc/user_guide/checkers/features.rst
@@ -31,6 +31,19 @@ Async checker Messages
function. This message can't be emitted when using Python < 3.5.
+Bad-Chained-Comparison checker
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Verbatim name of the checker is ``bad-chained-comparison``.
+
+Bad-Chained-Comparison checker Messages
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+:bad-chained-comparison (W3501): *Suspicious %s-part chained comparison using semantically incompatible operators (%s)*
+ Used when there is a chained comparison where one expression is part of two
+ comparisons that belong to different semantic groups ("<" does not mean the
+ same thing as "is", chaining them in "0 < x is None" is probably a mistake).
+
+
Basic checker
~~~~~~~~~~~~~
diff --git a/doc/user_guide/messages/messages_overview.rst b/doc/user_guide/messages/messages_overview.rst
index 6c4405b42..a1962f8e0 100644
--- a/doc/user_guide/messages/messages_overview.rst
+++ b/doc/user_guide/messages/messages_overview.rst
@@ -209,6 +209,7 @@ All messages in the warning category:
warning/assert-on-tuple
warning/attribute-defined-outside-init
warning/bad-builtin
+ warning/bad-chained-comparison
warning/bad-dunder-name
warning/bad-format-string
warning/bad-format-string-key