-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Cannot configure reports for detektMain and detektTest #5721
Comments
You should just be able to do it like this: tasks.detektTest {
reports {
custom {
reportId = "DetektGitlabReport"
destination = file("$buildDir/reports/detektTest/gitlab.json")
}
}
} |
Also to clarify: they do are instances of detekt/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/internal/SharedTasks.kt Lines 13 to 17 in 2afb8a9
|
@cortinico detekt/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/internal/DetektAndroid.kt Lines 25 to 39 in 2afb8a9
detekt/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/internal/DetektAndroid.kt Lines 80 to 103 in 2afb8a9
|
Sorry, we overlooked that this was on Android - you're correct, What are you actually trying to accomplish with your report output settings? |
I am looking for a way to have the main and test detekt tasks generate reports of which I know the names of. Since the Android tasks depend on the variants available (and they can be different from module to module), I was hoping there was a way for Detekt main and test tasks to collate all reports and generate one single HTML report per module that I can then reference back to. |
That's not currently supported but you might want to subscribe to updates to #5041 which may end up delivering the feature you're looking for. I think this can be closed - if you have other questions about how to setup your config I'd suggest opening a discussion instead of a new issue. |
I need to configure different report destinations for
detektMain
anddetektTest
, but it currently looks like this is unsupported.This is my configuration for my Android project:
This returns the following:
So I try and configure
reports
for, say,detektMain
:Since
detektMain
anddetektTest
are NOT instances ofio.gitlab.arturbosch.detekt.Detekt
, this will fail with:Is there any way to configure reports for
detektMain
anddetektTest
as well?The text was updated successfully, but these errors were encountered: