Thread
#detekt
    Big Chungus

    Big Chungus

    1 year ago
    Is it possible tu use detekt as formatter instead of ktlint?
    c

    chao

    1 year ago
    I assume you mean to auto-correct code in case of violation.
    The answer would be not as of today, the only auto-correction are performed by
    detekt-formatting
    , which wraps around
    ktlint
    Big Chungus

    Big Chungus

    1 year ago
    Well general formatting. Inserting spaces where needed, trimming loose whitespace, etc...
    Basically replicating ktlint formatter functionality
    c

    chao

    1 year ago
    detekt
    does not add additional support on top of
    ktlint
    , running detekt with
    --auto-correct
    option only performs the formatting that is already done by
    ktlint
    Big Chungus

    Big Chungus

    1 year ago
    That's what I'm looking for! Thanks.
    Would be good to have gradle tasks instead of flags for that, tho. Also I'm missing a task to setup git hooks that ktlint plugins provide
    c

    chao

    1 year ago
    CLI option https://detekt.github.io/detekt/cli.html Gradle option for autoCorrect seems missing in the document, but there is an
    autoCorrect
    property inside the
    detekt {}