-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The confidence option is not very intuitive to use #7121
Comments
How would we determine the order though? Is |
I think it's already ordered from high to low in the code (%= it should be an enum): HIGH = Confidence("HIGH", "Warning that is not based on inference result.")
CONTROL_FLOW = Confidence(
"CONTROL_FLOW", "Warning based on assumptions about control flow."
)
INFERENCE = Confidence("INFERENCE", "Warning based on inference result.")
INFERENCE_FAILURE = Confidence(
"INFERENCE_FAILURE", "Warning based on inference with failures."
)
UNDEFINED = Confidence("UNDEFINED", "Warning without any associated confidence level.") |
I think |
I think I'm the one who ordered it this way. My reasoning is that inference failure is not as good as successful inference. But to be honest I never saw a check verify the result of the inference before adding a message (often we do not raise anything if the inference fail). So I don't know if we're even using |
We are using it in some places 😉 I just saw 2/3 occurrences I think. |
Ok ! I'm on mobile so I can't check the codebase (😅). To be clearer : If we do not raise a message in case of inference failure and raise another message that we're more confident about instead... then inference failure is > inference. But if we're raising the same message based on inference failure anyway, then inference failure < inference. Maybe we should remove the distinction ? First case could be HIGH, second case could be INFERENCE. |
That seems to be how it's used, see: Let's leave the distinction for now, it's not hurting anything. I also think the current order is appropriate. |
On second thought, it doesn't need to block that issue, we can always document both options. |
I'm thinking making a breaking change for this in 4.0 wouldn't be very problematic (we added confidence for real not so long ago, and most message do not have confidence yet). |
Current problem
Right now you have to list all the confidence that you want to activate. So you have to know the confidences levels and use a list.
Desired solution
By giving onle one value and all the values with at least this confidence are activated. If you choose HIGH for example only HIGH is activated, but if you choose UNDEFINED, everything is activated.
Additional context
One of the point left from #746
The text was updated successfully, but these errors were encountered: