Skip to content

Instantly share code, notes, and snippets.

View pavelkorolevxyz's full-sized avatar
🕶️

Pavel Korolev pavelkorolevxyz

🕶️
View GitHub Profile
@pavelkorolevxyz
pavelkorolevxyz / violations.gradle.kts
Last active December 16, 2022 09:01
Gradle convention plugin with task to convert SARIF reports to Code Climate format
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 {
name: Pull Request
on:
pull_request:
branches: [ main ]
jobs:
pipeline:
runs-on: ubuntu-latest
@file:DependsOn("io.github.ackeecz:danger-kotlin-detekt:0.1.4")
import io.github.ackeecz.danger.detekt.DetektPlugin
import systems.danger.kotlin.*
import java.io.File
register.plugin(DetektPlugin)
danger(args) {
warnDetekt()
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektPlugin
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
plugins {
base
id("io.gitlab.arturbosch.detekt") // We need to apply this plugin with version in build.gradle.kts
}
dependencies {