ci: Publish ktlint report

This commit is contained in:
2025-04-12 04:32:51 +02:00
parent ec3ccafc4d
commit 53ef0f2e15
2 changed files with 16 additions and 1 deletions

View File

@@ -68,6 +68,14 @@ jobs:
- name: Run lint - name: Run lint
run: ./gradlew ktlintCheck 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: test:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -1,5 +1,7 @@
@file:Suppress("PropertyName") @file:Suppress("PropertyName")
import org.jlleitschuh.gradle.ktlint.KtlintExtension
val ktor_version: String by project val ktor_version: String by project
val kotlin_version: String by project val kotlin_version: String by project
val kotlin_serialization_version: String by project val kotlin_serialization_version: String by project
@@ -26,9 +28,14 @@ application {
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
} }
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> { configure<KtlintExtension> {
version.set("1.5.0") version.set("1.5.0")
} }
ktlint {
reporters {
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE)
}
}
repositories { repositories {
mavenCentral() mavenCentral()