Replies: 7 comments 9 replies
-
As mentioned above, this is just a proposal. I assume some of the points will be controversial. Here is some of my reasoning:
There was the idea of allowing any string as severity. I do not see much benefit in that.
IMO it would be inconsistent to have both unless we actually want to run the rule and still apply the
I think this will make the interface much cleaner. What is the use case for allowing five issues? Once there are four issues in the code base, every additional issue becomes a blocker. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this recap and the proposal. It is really useful. I like your proposal. Every point looks reasonable to me. Open questions:
|
Beta Was this translation helpful? Give feedback.
-
Looking into this some more, I realized, that for the sarif report the default severity of |
Beta Was this translation helpful? Give feedback.
-
My opinion is pretty much unchanged, as I wrote in another issue.
Each approach is better than the current severity feature. |
Beta Was this translation helpful? Give feedback.
-
If the inactive rule is equivalent to an ignore severity, does it still makes sense to have the ignore severity as the rule won't be run in the execution path? |
Beta Was this translation helpful? Give feedback.
-
I know that nearly all the static tools have this feature and that some users asked for it. But, did it provide enough value for the complexity that it adds to the project and to the configuration for our users. Something is an issue or it is not. I don't see on which use cases you want warnings instead of errors. If you need time to integrate a rule: use the baseline. |
Beta Was this translation helpful? Give feedback.
-
I like this approach of allowing detekt to report issues as Kotlin errors. We use Buck and currently only errors are shown. Also when using the detekt kotlin compiler plugin, we'd like to see issues reported as Kotlin errors so the build can fail early and provide faster feedback to devs (like errorprone) instead of needing to run an additional task to check for issues. One thing that I'd like to see considered is an ability to baseline new detectors when using the detekt kotlin compiler plugin. We should be able to temporarily not fail the build & keep compiling, but still collect all of the issues that should be errors during compilation and output them to a file somewhere so that we can baseline new rules more easily instead of having to keep building, updating baseline, and repeating until successful compiliation. |
Beta Was this translation helpful? Give feedback.
-
Context
It has been stated multiple times, that the detekt severity model is to complicated. The upcoming 2.0 is a chance to rework this concept without necessarily keeping backward compatibility.
Proposal
More information of what has already been discussed can be found in:
The following list tries to consolidate what seems to be consensus as well as make a proposal for the implementation.
error
,warning
andinfo
.error
.Issue
to theFinding
as it depends on a configurable rule instance.maxIssues
will be removed. The build fails if (and only if) there is at least one issue with the severityerror
.warningsAsError
but also allowing the threshold to be lowered toinfo
.build > weights
) will be removed.SeverityLevel
will be removed.Ideas for additional changes
The configuration option
active
will be removedignore
Configuration Example
Beta Was this translation helpful? Give feedback.
All reactions