Thread
#detekt
    l

    Lilly

    1 year ago
    Hi, I have registered the following task in my root build.gradle.kts:
    tasks.register<Detekt>("detektAll") {
            setSource(projectDir)
            buildUponDefaultConfig = true
            config.setFrom(configFile)
            parallel = true
            debug = true
            reports {
                xml.enabled = false
                html.enabled = false
                txt.enabled = false
            }
            include("**/*.kt")
            include("**/*.kts")
            exclude("resources/")
            exclude("build/")
        }
    I run the task with
    gradlew detektAll
    . Why does it log the output to console in first run but not in second run? Edit: ok got it. I had set the maxIssues to 30, now it's 0 again. Same code different question: my task does not show the
    formatting
    rule set from the
    formatting
    plugin while
    detekt
    does. Did I miss something. Edit2: ok got second issue too. I had to add
    dependencies {
        detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.14.2")
    }
    to my root build.gradle.kts, not to my sub projects build script. Edit3: correction: I have to add it to root build script and sub projects build script aswell
    gammax

    gammax

    1 year ago
    does not show the 
    formatting
     rule set
    Do you mean that you’re not getting issue reported for the
    formatting
    rule set?
    l

    Lilly

    1 year ago
    @gammax Thanks for your answer. I have solved it, see Edit2
    gammax

    gammax

    1 year ago
    👍