Enhancing Code Quality
As we develop our Android apps, we must ensure that the code we write complies with the set rules and follows the best practices. This not only helps us to write good code but also makes it easier to maintain and easily onboard others to the code base.
In this chapter, we will learn about the Kotlin style and the best practices for writing Kotlin code. We will also learn how to use plugins such as Ktlint and Detekt to format, lint, and detect the code smells early.
In this chapter, we’re going to cover the following main topics:
- Mastering Kotlin style and best practices
- Using Ktlint for static analysis
- Detecting code smells with Detekt