Skip to content

How does DIKTAT COMMON work #1265

Answered by petertrr
lyharrietbui asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!
DIKTAT_COMMON is not a rule, it is a set of options that can be used by all other rules. Disabling or enabling it should have no effect, IIRC.
kotlinVersion is used in some rules to determine, which language features are available. Diktat accepts both minor (like 1.5) and patch version (like 1.5.31).
The most important option in DIKTAT_COMMON is domainName, as it's used for checking package naming.
Diktat doesn't run ktlint, but diktat uses ktlint core as a framework. I.e., when invoked from spotless, only diktat ruleset is loaded and executed. Ktlint core loads editorconfig, but diktat doesn't use it, it uses only yaml config.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lyharrietbui
Comment options

@lyharrietbui
Comment options

@petertrr
Comment options

Answer selected by nulls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants