Skip to content
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

Use coverage? #1023

Open
smoelius opened this issue Mar 8, 2024 · 0 comments
Open

Use coverage? #1023

smoelius opened this issue Mar 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@smoelius
Copy link
Collaborator

smoelius commented Mar 8, 2024

It has been suggested a few times that Necessist could incorporate coverage information. Specifically, Necessist could forgo removing statements and method calls that are never executed. This would reduce Necessist's false positives, i.e., statements and method calls that Necessist incorrectly flags as unnecessary.

Thus far, I have avoided doing this because it could also introduce false negatives.

Specifically, if a statement is not included in Necessist's output, a user might conclude that the statement is necessary. In reality, the statement might just be dead.

Put another way, if the user reviews their coverage reports before running Necessist, then there is no problem. But it seems unwise to assume a user has reviewed their coverage reports.

Having said this, we might offer an option to use coverage. E.g., a --use-coverage option could say, "I understand the implications; go ahead an use coverage."

@smoelius smoelius added the enhancement New feature or request label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant