-
Notifications
You must be signed in to change notification settings - Fork 18
Description
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."