Video: https://www.youtube.com/watch?v=vRzE6HIz-_M
KotlinConf Talk: https://kotlinconf.com/talks/586687/
Static analysis is so much more than just finding lint errors. With custom static analyzers, you can collect data you are interested in to better understand your codebase at scale.
I personally found the idea of collecting custom analysis to be unapproachable and I didn’t know where to start. After making it through, and finding so much value, I want to break down that barrier for you through a series of examples. These examples are based on real use cases where you will learn how to write your own static analysis collectors for Kotlin, how to visualize the analysis results with Compose, and find hidden insights into your team’s project.
We’ll start by learning how to create a custom static analyzer of your project via Kotlin's Program Structure Interface (PSI) to collect the data. In this case we’ll collect Anvil and Dagger Dependency Injection contributions and usage.
We’ll then continue on to use the collected analysis data to render a Compose report allowing us to see these dependency relationships that are unavailable to the IDE (because it is unaware of our dependency injection frameworks).
This talk gives you the foundation you need to write custom static analysis collectors, how you can explore that data, and solve problems for your team at scale.