<https://twitter.com/mrmans0n/status/1507390768796...
# detekt
b
https://twitter.com/mrmans0n/status/1507390768796909571 really good ideas for create a custom and open-source rule set for
Compose
if someone is looking for a side project 😛. They have them wrote for
ktlint
but they can't open source it now.
💯 2
k
will see what we can do about open sourcing them...
❤️ 1
e
curious why the initial post about custom ktlint rules ended up in #detekt rather than #ktlint, but either way… it would be interesting to see open-sourced
I hope (expect) the core PSI walking they do is portable across ktlint/detekt/Android Lint
r
android lint is using uast, not psi afair
ah ok , just checked they also provide psi as parameters, that's nice
d
We too have a few detekt-based Compose-related checks (one of which I've mentioned in the above twitter thread). Some ideas which were mentioned in the thread are also what we planned to implement (in detekt), some are new and nice! Nice idea about side-project, I'll think about open-sourcing our rules too. My detekt-code may be ugly though, maybe I'll then ask someone from the detekt team for review. For now I'm writing a lot of tests and they pass => OK :)
👌 1
b
In my opinion, if the rule have tests to ensure that it works if the detekt code is ugly is not important. You (or anyone if is open source) can refactor it.
1
d
I have posted to the main channel, but just in case. Published a very basic ruleset of detekt rules for compose which we use for quite some time internally: https://github.com/appKODE/detekt-rules-compose
👌 2