https://kotlinlang.org logo
#detekt
Title
# detekt
d

dimsuz

12/23/2021, 11:45 AM
A thought which occurred to me several times: usually at work we run detekt without any reports, as a pre-push activity and also on CI. It would be nice if gradle output of failed rules somehow contained links to the rule descriptions. Or more details about them. When you're a seasoned dev, you already know what "UseDataClass" means, but if you're a junior dev you may not know and you'd have to google for it and it not always leads to docs right away.
b

Brais Gabin

12/23/2021, 12:05 PM
I can't agree more that this is an issue that detekt has. And I think that 1.20.0 can be the release to improve the reporting in general. I think that the key points to improve right now are: • https://github.com/detekt/detekt/pull/4386 create a style guide for the description of the rules. We need to document better all our rules and be more consistent. • Once we have that I'll like to review all our current rules fixing and improving the current descriptions. • Enable
LiteFindingsReport
by default (this is something that you can do right now in your project) • https://github.com/detekt/detekt/issues/3684 make type solving less verbose. Right now detekt is so verbose that it's difficult to find the error messages between all those warnings. • In the html report add links to the documentation of each reported rule. Any help in any of these points would be more than welcome.
🙌 1
If you want a url in each warning I think that you should implement your own reporter. It shouldn't be a difficult one but I don't think that detekt should provide it out of the box. But I recommend you to try
LiteFindingsReport
before that.
❤️ 1
And, of course, any suggestion in these regard is more than welcome.
d

dimsuz

12/23/2021, 12:18 PM
Niiice, I didn't know about
LiteFindingsReport
, will absolutely try it! All good points too, watching these issues.
4 Views