From 53ef0f2e15b1bde97671985f0a1be040b199a080 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Sat, 12 Apr 2025 04:32:51 +0200 Subject: [PATCH] ci: Publish ktlint report --- .github/workflows/tests.yml | 8 ++++++++ build.gradle.kts | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 72c8ce0..974cab0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -68,6 +68,14 @@ jobs: - name: Run lint run: ./gradlew ktlintCheck + - name: Publish ktlint report + uses: yutailang0119/action-ktlint@v4 + if: always() + with: + report-path: build/reports/ktlint/**/*.xml +# ignore-warnings: true # Ignore Lint Warnings + continue-on-error: false + test: needs: build runs-on: ubuntu-latest diff --git a/build.gradle.kts b/build.gradle.kts index 7a938d4..dbf1931 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ @file:Suppress("PropertyName") +import org.jlleitschuh.gradle.ktlint.KtlintExtension + val ktor_version: String by project val kotlin_version: String by project val kotlin_serialization_version: String by project @@ -26,9 +28,14 @@ application { applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") } -configure { +configure { version.set("1.5.0") } +ktlint { + reporters { + reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE) + } +} repositories { mavenCentral()