Skip to content
Source

Podlodka Android Crew #12. Day 2

The morning talk of the second Podlodka day from Grigory Shimichev about custom detekt rules. Same thing. I have experience, I've already written them, so half of the talk about what it's for and how to get it started could be safely skipped. Interesting only to hear about type resolution. We run detekt only on CI before build and without type resolution, so as not to waste extra time, and there's no feeling that we're missing much. Well, and heard the same from the speaker. It seems that the topic of type resolution in detekt is approximately like tests, everyone talks about it but everyone is just going to start using it properly.

Caught myself thinking that my favorite question formulation lately is "where's the line between this and that?". I very often try to feel it out, but don't always succeed. For example, where's the line between what Android Lint should check, what detekt should check, and what some Konsist? They even at first glance overlap in something despite their different, it would seem, goals, not to mention what custom things can be written there.

For content's sake, I'll throw random ideas for rules from our project: LiveData and MutableLiveData are forbidden, android.* imports in ViewModel are forbidden, public fields in ViewModel constructors are forbidden, class names like Base* are forbidden, checking the maximum number of classes in one file. Written in blood, however, it's still not entirely clear to the end whether this is even detekt's task.

The evening talk from Pasha Strelchenko about IntelliJ plugins is the best in content so far. Super rich and with practice, maximally cool and interesting narrative, as always. But this is largely precisely because I haven't yet dived into the rabbit hole of writing plugins. And I don't really want to, honestly, because I've heard about pain and suffering, especially in terms of supporting new IDE versions, why do I need this? If we talk about some lines, then I also clearly haven't yet crossed the one where I had an obvious need to write a plugin for the IDE instead of some Gradle task or standalone utility. It's either some scale joke that I haven't seen yet, or the remaining 80% of effort for 20% of result.