Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detekt compiler plugin configuration does not respect exclusions set #7106

Open
WebTiger89 opened this issue Mar 27, 2024 · 2 comments
Open

Comments

@WebTiger89
Copy link

I configure the plugin by following the instructions in the docs:

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
    detekt {
        exclude("build/")
        include("**/*.kts")
    }
}

my regular detekt configuration:

detekt {
    config.setFrom("config/detekt.yml")
    // Scan project dir for files
    source.setFrom(projectDir)
    // Config file is built upon default
    buildUponDefaultConfig = true
    // Turns on all the rules. `false` by default.
    allRules = true
    // Additional output on task execution
    debug = true
    // If set to `true` the build does not fail when the maxIssues count was reached
    ignoreFailures = false
    enableCompilerPlugin = true
}

but when I run .\gradlew compileKotlin it analysis the whole build folder. Also when I run it twice with .\gradlew compileKotlin --no-build-cache it does not analyse the build folder anymore which implies that this behavior happens with my source files which I want to get analysed but are only analysed in the first run which would be a wrong behavior

@cortinico
Copy link
Member

Please follow the discussion over here: #6611

Plus other relevant discussion where this has already been discussed:
#6604
#6958

I configure the plugin by following the instructions in the docs:

Also where in the docs have you found this?
https://detekt.dev/docs/gettingstarted/compilerplugin/

@detekt-ci
Copy link
Collaborator

This issue is waiting for authors feedback since 30 days. Please comment providing the requested feedback or this issue will be closed in 7 days.

@detekt-ci detekt-ci added stale and removed stale labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants