Abstract

Kotlin is a relatively new programming language that is becoming more and more popular year after year. As the global codebase written in Kotlin grows, developers require intelligent solutions for static analysis to prevent code issues. These tools are built on top of different Intermediate Representations (IR), provided by the Kotlin compiler: Program Structure Interface (PSI), new Intermediate Representation (new IR), and Abstract Syntax Tree (AST). However, existing code analysis tools have limitations, including complexity, low configurability, poor performance, and the small number of inspections. To address these limitations, we propose an approach of the lightweight static analysis for Kotlin, which was implemented in the Diktat project. We will also cover industrial problems of static analysis for Kotlin and will review the usage of different IRs for that purpose. Most popular open-source analyzers will be reviewed and compared by quality metrics.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.