-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
7643fd1
commit d7aca42
Showing
30 changed files
with
100 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# pylint: disable=missnig-docstring # [unknown-option-value] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# pylint: disable=missing-docstring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""'bad-continuation' was removed from pylint in https://github.com/PyCQA/pylint/pull/3571""" | ||
|
||
# pylint: disable=bad-continuation # [useless-option-value] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
You can disable this check if you don't want to cleanup your configuration of old messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""'bad-continuation' was removed from pylint in https://github.com/PyCQA/pylint/pull/3571""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
tests/config/functional/ini/pylintrc_with_deleted_message.2.out
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config/functional/ini/pylintrc_with_deleted_message.8.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
************* Module {abspath} | ||
{relpath}:1:0: R0022: Useless option value for '--disable', 'buffer-builtin' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942. (useless-option-value) | ||
{relpath}:1:0: R0022: Useless option value for '--enable', 'cmp-builtin' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942. (useless-option-value) |
4 changes: 2 additions & 2 deletions
4
tests/config/functional/ini/pylintrc_with_deleted_message.result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
tests/config/functional/ini/pylintrc_with_missing_comma.2.out
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config/functional/ini/pylintrc_with_missing_comma.4.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
************* Module {abspath} | ||
{relpath}:1:0: W0012: Unknown option value for '--disable', expected a valid pylint message and got 'logging-not-lazylogging-format-interpolation' (unknown-option-value) | ||
{relpath}:1:0: W0012: Unknown option value for '--enable', expected a valid pylint message and got 'locally-disabledsuppressed-message' (unknown-option-value) |
2 changes: 0 additions & 2 deletions
2
tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.4.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
************* Module {abspath} | ||
{relpath}:1:0: W0012: Unknown option value for '--enable', expected a valid pylint message and got 'useless-supression' (unknown-option-value) |
3 changes: 0 additions & 3 deletions
3
tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config/functional/toml/issue_3122/toml_with_missing_comma.4.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
************* Module {abspath} | ||
{relpath}:1:0: W0012: Unknown option value for '--disable', expected a valid pylint message and got 'logging-not-lazylogging-format-interpolation' (unknown-option-value) | ||
{relpath}:1:0: W0012: Unknown option value for '--enable', expected a valid pylint message and got 'locally-disabledsuppressed-message' (unknown-option-value) |
3 changes: 0 additions & 3 deletions
3
tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.4.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
************* Module {abspath} | ||
{relpath}:1:0: W0012: Unknown option value for '--disable', expected a valid pylint message and got 'logging-not-layzy' (unknown-option-value) | ||
{relpath}:1:0: W0012: Unknown option value for '--enable', expected a valid pylint message and got 'C00000' (unknown-option-value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
"""Check unknown or deleted option. """ | ||
|
||
# Standard disable with unknown value | ||
# pylint: disable=C05048 # [bad-option-value] | ||
# pylint: disable=C05048 # [unknown-option-value] | ||
# Standard disable with deleted symbol | ||
# pylint: disable=execfile-builtin # [bad-option-value] | ||
# pylint: disable=execfile-builtin # [useless-option-value] | ||
# Standard disable with deleted msgid | ||
# pylint: disable=W1656 # [bad-option-value] | ||
# pylint: disable=W1656 # [useless-option-value] | ||
# disable-next with unknown value | ||
# pylint: disable-next=R78948 # [bad-option-value] | ||
# pylint: disable-next=R78948 # [unknown-option-value] | ||
# disable-next with deleted symbol | ||
# pylint: disable-next=deprecated-types-field # [bad-option-value] | ||
# pylint: disable-next=deprecated-types-field # [useless-option-value] | ||
# disable-next with deleted msgid | ||
# pylint: disable-next=W1634 # [bad-option-value] | ||
# pylint: disable-next=W1634 # [useless-option-value] | ||
|
||
# enable with unknown value | ||
# pylint:enable=W04044 # [bad-option-value] | ||
# pylint:enable=W04044 # [unknown-option-value] | ||
# enable with deleted symbol | ||
# pylint:enable=no-space-after-comma # [bad-option-value] | ||
# pylint:enable=dict-values-not-iterating # [useless-option-value] | ||
# enable with deleted msgid | ||
# pylint:enable=W1622 # [bad-option-value] | ||
# pylint:enable=W1622 # [useless-option-value] | ||
|
||
# Standard disable with deleted old name symbol of deleted message | ||
# pylint: disable=no-space-after-operator # [bad-option-value] | ||
# pylint: disable=no-space-after-operator # [bad-option-value] <= This is wrong | ||
# Standard disable with deleted old name msgid of deleted message | ||
# pylint: disable=C0323 # [bad-option-value] | ||
# pylint: disable=C0323 # [bad-option-value] <= This is wrong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
bad-option-value:4:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'C05048':HIGH | ||
bad-option-value:6:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'execfile-builtin':HIGH | ||
bad-option-value:8:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'W1656':HIGH | ||
bad-option-value:10:0:None:None::Bad option value for 'disable-next', expected a valid pylint message and got 'R78948':HIGH | ||
bad-option-value:12:0:None:None::Bad option value for 'disable-next', expected a valid pylint message and got 'deprecated-types-field':HIGH | ||
bad-option-value:14:0:None:None::Bad option value for 'disable-next', expected a valid pylint message and got 'W1634':HIGH | ||
bad-option-value:17:0:None:None::Bad option value for 'enable', expected a valid pylint message and got 'W04044':HIGH | ||
bad-option-value:19:0:None:None::Bad option value for 'enable', expected a valid pylint message and got 'no-space-after-comma':HIGH | ||
bad-option-value:21:0:None:None::Bad option value for 'enable', expected a valid pylint message and got 'W1622':HIGH | ||
unknown-option-value:4:0:None:None::Unknown option value for 'disable', expected a valid pylint message and got 'C05048':HIGH | ||
useless-option-value:6:0:None:None::"Useless option value for 'disable', 'execfile-builtin' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
useless-option-value:8:0:None:None::"Useless option value for 'disable', 'W1656' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
unknown-option-value:10:0:None:None::Unknown option value for 'disable-next', expected a valid pylint message and got 'R78948':HIGH | ||
useless-option-value:12:0:None:None::"Useless option value for 'disable-next', 'deprecated-types-field' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
useless-option-value:14:0:None:None::"Useless option value for 'disable-next', 'W1634' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
unknown-option-value:17:0:None:None::Unknown option value for 'enable', expected a valid pylint message and got 'W04044':HIGH | ||
useless-option-value:19:0:None:None::"Useless option value for 'enable', 'dict-values-not-iterating' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
useless-option-value:21:0:None:None::"Useless option value for 'enable', 'W1622' was removed from pylint, see https://github.com/PyCQA/pylint/pull/4942.":HIGH | ||
bad-option-value:24:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'no-space-after-operator':HIGH | ||
bad-option-value:26:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'C0323':HIGH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
bad-option-value:10:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'a-removed-option':HIGH | ||
bad-option-value:13:0:None:None::Bad option value for 'disable', expected a valid pylint message and got 'a-removed-option':HIGH | ||
unknown-option-value:10:0:None:None::Unknown option value for 'disable', expected a valid pylint message and got 'a-removed-option':HIGH | ||
unknown-option-value:13:0:None:None::Unknown option value for 'disable', expected a valid pylint message and got 'a-removed-option':HIGH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters