问题
I'm using an rc file that has:
ignore-patterns=".*local.*"
I expect this to ignore all files with the word local
in the name. So, tmplocal.py
, tmp.local.py
, tmp_local.py
, local_tmp.py
, etc.
When running Pylint (1.7.2), these files are not ignored. Any suggestions?
回答1:
What ended up working for me was not including quotes. My current config looks something like this: ignore-patterns=one.py,.*local.*
$ pylint --version
pylint 1.7.2,
astroid 1.5.3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609]
回答2:
Seems from my tests that ignore-patterns
is only working in CLI. Try with:
pylint --ignore-patterns ...
来源:https://stackoverflow.com/questions/45870233/pylint-ignore-patterns-not-working