Last active
December 16, 2022 09:01
-
-
Save pavelkorolevxyz/c36c47e91973cc734d7d8d04abbde51c to your computer and use it in GitHub Desktop.
Gradle convention plugin with task to convert SARIF reports to Code Climate format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import se.bjurr.violations.gradle.plugin.ViolationsTask | |
plugins { | |
id("se.bjurr.violations.violations-gradle-plugin") | |
} | |
val outputReportFile = file("$buildDir/reports/violations/code-climate.json") | |
tasks.register<ViolationsTask>("violations") { | |
doFirst { | |
outputReportFile.parentFile.mkdirs() | |
} | |
codeClimateFile = outputReportFile | |
violations = listOf( | |
listOf("SARIF", buildDir.path, ".*/reports/detekt/report.sarif", "sarif"), | |
) | |
} |
Could be used like this
plugins {
id("violations")
}
and running task from the same module
./gradlew violations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dependency used
implementation(se.bjurr.violations:violations-gradle-plugin:1.52.2)