Static Kotlin Bug Hunting • Marharyta Nedzelska • YOW! 2023

Discover the challenges and solutions in static Kotlin bug hunting, including the introduction of semantic models, non-null assertions, and the importance of debugging, testing, and community involvement.

Key takeaways
  • Lack of proper static analysis for Kotlin made it difficult to detect bugs and maintain code quality.
  • The initial approach was to use the generalized tree, but it was inefficient and not extensible.
  • The introduction of semantic models in Kotlin 2.0 improved the precision of static analysis.
  • The use of non-null assertions and Kotlin’s ability to directly access variables to make code more readable and efficient.
  • The importance of debugging and testing code, even with warning-free code.
  • The need for documentation and naming conventions to improve code readability and maintainability.
  • The trade-off between precision and performance in static analysis.
  • The use of Kotlin’s features, such as extension functions, to improve code organization and readability.
  • The need for community involvement and user feedback to improve static analysis and code quality.
  • The importance of testing and validation in static analysis.
  • The use of Kotlin’s type system to detect type errors and improve code quality.
  • The need for a class pass in Kotlin to detect unused code and improve code quality.
  • The importance of semantic models in Kotlin to detect type errors and improve code quality.
  • The use of Kotlin’s features, such as delegates, to improve code organization and readability.
  • The need for a converter to add new languages to the static analyzer.
  • The trade-off between precision and performance in static analysis.
  • The importance of testing and validation in static analysis.