pylint
pylint copied to clipboard
Provide a --ignore-file option with .gitignore as default
Current problem
When I run pylint, report warning are found on files ignored by .gitignore (vendor, generated file etc...).
Because of that, I have to specify nearly the same configuration as the .gitignore to the --ignore-paths option, but with a different format.
This is config repetition that make project and CI configuration heavier to maintain.
Desired solution
Make pylint considering the .gitignore file for analysis ignorance.
it SHOULD also provide a --ignore-file option to specify an another file than .gitignore to consider.
It MAY also taking into account equivalent of .gitignore for other versioning tools (svn, hg...).
Additional context
Related to https://github.com/PyCQA/pylint/issues/2279.
See comment: https://github.com/PyCQA/pylint/issues/2279#issuecomment-1224016019
This would be a very useful feature.