Add severity to different md, html reports#9167
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9167 +/- ##
=========================================
Coverage 85.03% 85.03%
Complexity 4439 4439
=========================================
Files 571 571
Lines 12335 12335
Branches 2694 2694
=========================================
Hits 10489 10489
Misses 681 681
Partials 1165 1165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BraisGabin
left a comment
There was a problem hiding this comment.
Can you modify the test issues so they have different severity so we test the different outputs?
| Info, | ||
| } | ||
|
|
||
| fun Severity.prefix() = |
There was a problem hiding this comment.
I wouldn't add this to our public api. I would probably duplicate this.
| span("location") { | ||
| text( | ||
| "$pathString:${issue.location.source.line}:${issue.location.source.column}" | ||
| "${issue.severity.prefix()}: $pathString:${issue.location.source.line}:${issue.location.source.column}" |
There was a problem hiding this comment.
Shall detekt only show a one char prefix or something more descriptive?
CC @BraisGabin
There was a problem hiding this comment.
Error
Warn
Info
might be more understandable for new detekt users.
There was a problem hiding this comment.
For html or md, sure. We have plenty of space. For that reason I think that the prefix function shouldn't be shared. Each report may want different wording
There was a problem hiding this comment.
Updated the logic as per this statement
41d2ce9 to
0e3ce47
Compare
0e3ce47 to
6d25ec8
Compare
@BraisGabin Updated the TCs to include different severity |
Fixes #9068