summaryrefslogtreecommitdiff
path: root/pylint/config
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-06-04 15:08:49 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-06-06 10:38:35 +0200
commit92f28ce43cccdbdb8b41723e9ed86b2bbfaa2de3 (patch)
tree98f7242aa23d8d52437cb349a01215f3adbbc03c /pylint/config
parentf8756edd025d9f4a88805feacb1a038e54840d02 (diff)
downloadpylint-git-92f28ce43cccdbdb8b41723e9ed86b2bbfaa2de3.tar.gz
[bad-option-value] Add a 'useless-option-value' message
So it's possible to to distinguish between genuine typoes and old configuration that could be cleaned. We use old_names to decrease message type to warning
Diffstat (limited to 'pylint/config')
-rw-r--r--pylint/config/callback_actions.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pylint/config/callback_actions.py b/pylint/config/callback_actions.py
index f1a7bece0..8ce5df179 100644
--- a/pylint/config/callback_actions.py
+++ b/pylint/config/callback_actions.py
@@ -378,10 +378,14 @@ class _XableAction(_AccessLinterObjectAction):
for msgid in utils._check_csv(values[0]):
try:
xabling_function(msgid)
+ except exceptions.DeletedMessageError as e:
+ self.linter._stashed_messages[
+ (self.linter.current_name, "useless-option-value")
+ ].append((option_string, str(e)))
except exceptions.UnknownMessageError:
- self.linter._stashed_messages[self.linter.current_name].append(
- (option_string, msgid)
- )
+ self.linter._stashed_messages[
+ (self.linter.current_name, "unknown-option-value")
+ ].append((option_string, msgid))
@abc.abstractmethod
def __call__(