-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
Change threshold definition in detekt #313
Comments
Leave the threshold as it is now. Every value > threshold get flagged. |
Change to every value >= threshold get flagged. |
I have no preference since even having one warning / error fails my builds. Naturally if the threshold is 3, I'd expect to only fail on 4. If we look at the definition:
It uses the word |
>= |
For me the most natural semantics (independently of whether you call it "threshold" or something else) would be to specify "the maximum number of accepted defects". This is nice because in a project where you continuously reduce the number of defects, the current threshold would show the remaining number of defects to address. I believe this is more natural than specifying the number of defects starting from which a build is supposed to fail. So, how about a compromise and keep the |
First: I will change the threshold definition to Second: Remove |
Sounds good. I haven't used either thresholds much so don't have a strong opinion on the warning/error thresholds overall. |
…eshold' - #313 Use the new 'maxIssues' property instead
…eshold' - #313 Use the new 'maxIssues' property instead
I think this is done for now :). |
This version as the UP-TO-DATE check fixed, see detekt/detekt#725 Also, the "warningThreshold" and 'failThreshold' properties were deprecated in favor of the new "maxIssues" property, see detekt/detekt#313
This version as the UP-TO-DATE check fixed, see detekt/detekt#725 Also, the "warningThreshold" and "failThreshold" properties were deprecated in favor of the new "maxIssues" property, see detekt/detekt#313
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics. |
As mentioned by @schalkms in #300 detekt's definition of a
threshold
is: Every value which is greater than the threshold should be flagged eg. for threshold 3:Other tools uses a value-inclusive-threshold: Every value which greater than or equals the threshold should get flagged eg. for threshold 3:
Discuss and vote :)
The text was updated successfully, but these errors were encountered: