Skip to content

enable/disable options in rcfile should not depend on the order with which they are specified #3696

@sandrotosi

Description

@sandrotosi

Hello,
i'm running pylint 2.5.3 / astroid 2.4.2; i kinda understand why

$ pylint --enable=all --disable=fixme

behaves differently than

$ pylint --disable=fixme --enable=all

(where the first command enables everything and then disable fixme, while the second command the disable option is overwritten by enable=all) but i dont think it should be the same in the rcfile: the disable section is (by default) before the enable section, so if i want to have the same effect of command1 i need to swap the sections around.

on the cli i can specify multiple enable/disable options, but that's not allowed in the rcfile, so the
current result is extremely counter-intuitive; and rcfile with

disable=fixme
enable=all

is clear what result the user wants: to enable all checks except for some, and i shouldnt need to move config options around.

can you please get that fixed?

Thanks!

Metadata

Metadata

Labels

ConfigurationRelated to configurationEnhancement ✨Improvement to a componentHacktoberfestNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions