Description
Is your feature request related to a problem? Please describe
This request is similar request to #618 (Add different configuration for different sub directories) but at the file level.
Currently, pylint
apply the same config instinctively to all files. However some rules should be applied only to specific files.
For instance it is really frequent in test files to access private members (assert module._some_fn()
). Currently all our tests files trigger hundreds of protected-access
warnings.
Describe the solution you'd like
We would like a way to overwrite specific rules for all *_test.py
files.
For instace being able to register some pattern="**/*_test.py"
with custom rules associated. All files which would match the pattern would use the special pylint rules.
Note: if the pattern accept directory names (some_dir/**
), it would also solve #618 while being more flexible (like: **/some_dir/**
).