Hey guys! Do you usually display Detekt results in...
# detekt
l
Hey guys! Do you usually display Detekt results in the README some way? I was thinking that it would be an interesting shield to have in projects, a code-quality based on detekt findings. I couldn't find anything that could help me with this in
<http://shields.io|shields.io>
. Do you have any ideas?
b
The problem I see is where to get the number of findings that detekt found in the main branch.
l
The
detekt.md
files contains all of the metrics, but they're in markdown. How could we scan it to display in a badge using github?
b
Where is that file so shield could read it?
We could even create a format for shield but, how we connect it to shield?
I don't know exactly how to fetch it inside an action/shield, but the outputted format could be easily read
https://detekt.dev/docs/introduction/reporting There are other reporting methods that could be used instead, such as HTML if it's easier
But the path would be Generate Markdown -> Make shield get the latest one -> Select which property you want displayed
b
The easier one is txt. We just need to count the lines of that file.
The problem to me is the second step.
l
I think using
txt
will only allow reporting code smells, not other values such as number of properties
But it's the easiest to display a number of smells indeed