Thread
#detekt
    Jukka Siivonen

    Jukka Siivonen

    9 months ago
    Does anyone know what is the current state of "Identation" rule? We are using latest IDEA plugin, latest IDEA and Detekt 1.18.1 with Gradle but IDEA formatter does not produce formatting that satiesfies Detekt IDEA plugin. For example Detekt - Indentation: Unexpected indentation (12) (should be \8) and Detekt - Indentation: Missing newline after "("
    Also IDEA formatter is set "Kotlin style guide"
    In formatter settings all indent settings are set to "4" but if I set all indent rule settings to "4" I get Identation: Unexpected indentation
    if I set rule continuationIndentSize: 8 (which conflicts formatter set to 4) this error goes away and all I get is "Missing newline" errors
    so bottom line is which kind of formatter/rule settings I need so that auto-format satisfies rules
    Ok somehow I think I figured out indentation length problems, "Missing newline" is pretty annoying since IDEA formatter does not fix that automatically
    gammax

    gammax

    9 months ago
    Maybe something to cross-post inside #ktlint?
    Jukka Siivonen

    Jukka Siivonen

    9 months ago
    One more thing about these issues, is this intended behavior with Detekt IDEA plugin that Indent rule shows error for every line in file and not only the one breaking the rule? I can't see this behavior with any other rules. Using Gradle plugin line numbers are reported properly.
    Michael Marshall

    Michael Marshall

    9 months ago
    I see this with the final newline rule too, it’s a bit overkill
    Jukka Siivonen

    Jukka Siivonen

    9 months ago
    That is true, I forgot that. But that's pretty easy to fix since the problem is always in constant place. With these indent problems for even semi-large file it's hard to spot right place. It would help if "Detekt - Indentation.." message would show at least line number but I guess that is not way it is supposed to work, since the error should be marked only on the problematic line.
    if this can be considered as a bug I can submit Github issue though I'm not sure what is proper place for plugin issues
    gammax

    gammax

    9 months ago
    If it’s related to the IntelliJ Plugin, then here https://github.com/detekt/detekt-intellij-plugin/
    Jukka Siivonen

    Jukka Siivonen

    9 months ago