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
537 stars 39 forks source link

Typed configuration #1694

Open nulls opened 1 year ago

nulls commented 1 year ago
          Good by for now, anyway need to go step-by-step here. I think we will need a fixed schema with keys that would be rule names, for example:
[LONG_LINE]
    enabled=true

or

"LONG_LINE": {
     "enabled": "true"
}

_Originally posted by @akuleshov7 in https://github.com/saveourtool/diktat/pull/1686#discussion_r1226937255_


nulls commented 11 months ago

We have two two plugins and one external spotless where we can configure rules. We can use code-generation: we specify configuration in a single place and it generates configuration for gradle and maven plugins + classes for rules in diktat-rules. Such approach also will allow to support different sources: old yml, editorconfig and in-code settings.