Closed mathbunnyru closed 1 year ago
I'm not sure I follow up correctly, but the category is anyways printed with the message:
file.py:58: unused variable 'my_unused_var' (unused_variable)
^^^^^^^^^^^^^^^
Yes, you're right, what I meant is to get rid of confidence in its current implementation, because it's a bit misleading.
I updated the title accordingly. I like the --min-confidence feature and to make it useful we need to show confidence values. Maybe we should improve the docs about confidence values or improve the confidence values themselves, though.
It feels that something like --strictness-level
could be more accurate? Specific types of errors fall into different categories of strictness. The confidence level percentages seem to imply some probability that the code is unused, which is misleading—there is no probabilistic modeling done whatsoever.
Right now confidence doesn't make a lot of sense - as far as I understand, it is based purely on type of unused code and only has several possible values.
Instead, it would be better to have something like this:
file.py:58: unused variable 'my_unused_var' (unused_variable)
And we will be able to filter out categories of unused code.
This will also solve issue: https://github.com/jendrikseipp/vulture/issues/261