-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add the ability to use the full path for exclude folder/file #310
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #310 +/- ##
==========================================
- Coverage 98.94% 98.36% -0.59%
==========================================
Files 21 21
Lines 665 671 +6
==========================================
+ Hits 658 660 +2
- Misses 7 11 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@jendrikseipp, what do you think? will it be useful for the project? |
Thanks for the PR! It'll take me a while until I can review it properly. Two quick notes:
If you can rework the PR in these directions, that'll help getting it merged. If you already check both of these, all the better :-) |
@jendrikseipp, since this is a new feature - backwards compatibility should remain in full for option exclude files. Option exclude files with Lines 263 to 266 in e2e84d0
|
@jendrikseipp, pls tell us how the progress on this PR is going:) |
@jendrikseipp, what is the status of PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this! Please also add a short changelog entry.
@@ -2,6 +2,7 @@ | |||
from fnmatch import fnmatch, fnmatchcase | |||
from pathlib import Path | |||
import pkgutil | |||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort imports alphabetically. And use import os.path
instead of import os
.
call_vulture( | ||
[ | ||
"vulture", | ||
"--exclude=./core.py,./whitelists", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test will succeed even without the exclude. I suggest to use vulture vulture/lines.py --exclude vulture/lines.py
instead. And have two tests: returncode == 0 with exclude, returncode != 0 without exclude.
@mirecl Are you still planning to work on this? |
Description
AS-IS:
Currently, there’s no way to specify concrete path in exclude section, this is due to Vulture will always add
*
to both start and end of the string:vulture/vulture/core.py
Lines 263 to 266 in e2e84d0
TO-BE:
Now, prefixing exclude value with
./
will resolve to full specific path:Checklist:
tox -e fix-style
to format my code and checked the result withtox -e style
.