saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
525 stars 39 forks source link

New framework: Investigate possibilities to run diktat as kotlin compiler plugin #734

Open petertrr opened 3 years ago

petertrr commented 3 years ago

Probably, should be done after #606. In DiktatRule we can implement logic adapting c.p.k.c.Rule.visit to kotlin's visitors, everything else should be easy to get working. Configuration options should be shared with gradle-plugin, like in detekt compiler plugin

orchestr7 commented 2 years ago

It is a very complex task. Right now, our framework - ktlint does not support this. This task will force us to write custom framework, based on the compiler plugin OR to adopt some other frameworks, like detekt

nulls commented 2 years ago

Slides from KotlinConf about plugin: https://resources.jetbrains.com/storage/products/kotlinconf2018/slides/5_Writing%20Your%20First%20Kotlin%20Compiler%20Plugin.pdf