-
Notifications
You must be signed in to change notification settings - Fork 16
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
Exclude development tools from unused dependencies detection #365
Conversation
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 looks really good, except for a couple of minor changes outlined below (most of my comments are just copies of one change).
In addition to this, I'd like to see an update to the documentation of the --ignore-unused
option, to reflect the new default/behavior.
I'm not sure if we should also update the help text:
$ fawltydeps --help
...
--ignore-unused DEP_NAME [DEP_NAME ...]
Dependencies to ignore when looking for unused dependencies, e.g. --ignore-unused pylint black
...
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.
No further objections, your honor. 😉
Great work! 🚀
Description
Closes #117
This PR addresses the issue of handling tools (development dependencies) that are reported as "unused" in the project's dependencies. The solution involves introducing a
default_ignore_unused
list that includes common development tools known not to be imported directly in the project's scripts.There are two scenarios:
ignore_unused
option, Fawltydeps will use thisdefault_ignore_unused
list as its default, automatically detecting and ignoring the specified development tools.ignore_unused
option, it will overwrite the default one, and Fawltydeps will use the user-defined list instead.Changes Made
default_ignore_unused
list to specify default development tools to be ignored.test_cmdline_on_ignored_undeclared_option
to includecheck_unused_action_on_default_ignored_unused_dep__outputs_nothing
(automatically detect using default ignore_unused list) andcheck_unused_action_on_overriden_ignored_unused_dep__outputs_nothing
(using user defined ignore_unused list)