Replies: 2 comments 9 replies
-
You're right that there is no "easy" way to do this today, beyond what you suggested.
I think it will create more confusion at this stage, as we'll have to define arbitrary weight per severity which would force users to make calculations. Having everything weighted as 1 instead allows for further customization based on the codebase you're on. |
Beta Was this translation helpful? Give feedback.
-
I agree with @cortinico.
However, you could adjust the weight in the Note that, we also had a discussion in #3274 for that topic. There was not much feedback from the community about changing this option, though. |
Beta Was this translation helpful? Give feedback.
-
Currently (v1.20.0), as far as I've been able to tell, the only way that I can get detekt to report as passing (using the gradle plugin) is to manually set the weight to zero of each rule that I don't want to be seen as an error (i.e. so that warnings and infos don't cause failures).
I think that I would make sense to have the severity of a rule determine the default weight of the rule, no? e.g. all rules that don't have a severity of error would have a default weight of zero. If one wants they could always override the default weight with the already provided way of setting weights.
On top of that, it would be nice if the console reporters and the html/text reports showed the severity so that when an error is present, one can distinguish between errors, warnings, and info's in the reports.
Sorry if there is a way to do this already, I can't seem to find it if there is an existing solution.
Beta Was this translation helpful? Give feedback.
All reactions