Detekt report in CodeClimate format
Shutout to Cromefire's implementation for inspiration.
- Add dependency on the library in
detektPlugin
configuration
repositories {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
add("detektPlugins", "io.github.lexa-diky:detekt-code-climate:0.0.2-SNAPSHOT")
}
- Add the report in detekt settings
tasks.detekt {
// recommended for better report generation
basePath = project.layout.projectDirectory.asFile.absolutePath
reports {
custom {
reportId = "code-climate"
outputLocation.set("<location>")
}
}
}
prettyPrint
(default: true) - if true, output json will be properly formatted and human-readable
To enable GitLab to read the generated report, please follow official guide.