-
-
Notifications
You must be signed in to change notification settings - Fork 794
DetektAll with baseline fails with error #2100
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
Comments
Did you execute the |
When I run |
I have run
This does generate only one baseline, but the file itself is basically empty even after the task has finished:
That's the entire file. Additionally, running the |
It might be that if the baseline is the same the whole time, it gets overwritten every time a new module is scanned? |
I also suspect that. |
Sorry for the late response @adrianczuczka , you can create a custome baseline task which generates it for the whole project as well: task baseline(type: io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
description = "Overrides current baseline."
input = files(rootProject.projectDir)
config = files("$rootDir/detekt/config.yml")
baseline = file(new File(rootProject.projectDir, "/detekt/baseline.xml"))
failFast = true
parallel = true
include '**/*.kt'
include '**/*.kts'
exclude '**/test/resources/**'
exclude '**/afk-*/build/**'
} For the modules you already have overridden the baseline :) |
That's cool! |
Thank you so much for the Gradle task! I had to change a few things to make the task work: Just checked again and it seems the error in Also, On the surface, it seems that the task works. However, running detekt with this baseline, it still fails with a lot of uncaught issues. |
I think it works now, and what I had to do is move the task into a |
I have a multi-module project and I want to create one baseline file for the entire project instead of one per module, so I'm trying to replicate the detektAll task that is created in this project's build.gradle.kts file. However, I have had to translate this task into Groovy, and it looks like this:
However, running this fails with the error
Is there a fix for this?
The text was updated successfully, but these errors were encountered: