-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex for ignoring hidden directories doesn't work as expected #7089
Comments
@matusvalo this is possibly related to #6964. Thanks! |
@tbennett0 could you verify the issue with the main branch whether it fixes the issue? |
@matusvalo |
OK I have misread the issue. So I need to fix the fix of the fix :-/. OK I am sorry for that. Doing recursive linting seems to be not so trivial as looked in the first place :-/ |
OK, I have investigated issue. It seems that the issue has root cause in parameter parsing rather then in recursive logic:
(Pdb) p element
'.local/test.py'
(Pdb) p ignore_list_paths_re
[re.compile('^\\\\.local\\\\.*$|^/.local/.*$')]
(Pdb) ignore_list_paths_re[0].match(element)
It seems like managing path delimiter in windows, but I am not 100% confident with this part of pylint. @DanielNoord could you give me a hint? |
Ah yeah. This is a duplicate of #5398. |
OK so I am closing it as duplicate. |
Bug description
In running
pylint --recursive y .
to ignore hidden directories using 2.14.4, I discovered the following pattern works:but this one doesn't:
I would expect that the regex would see
.
as any character, so it matches the first, but explicitly using an escaped period that should also match doesn't cause that path to be ignored.Configuration
Command used
% pylint --recursive=y .
Pylint output
Expected behavior
No output on both examples.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: