From 6117e7af53abdc734c547787e70207c8236d36d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 13:46:52 +0000 Subject: [PATCH 1/2] Update gradle.starter to v0.72.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 01d1dc1..a88630b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -gradle-starter = "0.71.0" +gradle-starter = "0.72.0" gradle-pluginpublish = "1.2.1" gradle-doctor = "0.9.2" google-agp = "8.4.0" From d1ba4374f1c35479090ef15ec77e1f81358fe222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Wed, 1 May 2024 15:59:21 +0200 Subject: [PATCH 2/2] Fix codestyle --- .../main/kotlin/io/github/usefulness/support/BaselineUtils.kt | 1 + .../kotlin/io/github/usefulness/tasks/CheckEditorConfigTask.kt | 1 + .../io/github/usefulness/tasks/workers/ConsoleReportWorker.kt | 2 ++ 3 files changed, 4 insertions(+) diff --git a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/support/BaselineUtils.kt b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/support/BaselineUtils.kt index f0b8f0b..3e436f5 100644 --- a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/support/BaselineUtils.kt +++ b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/support/BaselineUtils.kt @@ -10,6 +10,7 @@ internal fun File.readKtlintBaseline(): Map>? { val baseline = loadBaseline(absolutePath, errorHandling = BaselineErrorHandling.LOG) when (baseline.status) { Baseline.Status.VALID -> Unit + Baseline.Status.NOT_FOUND, Baseline.Status.INVALID, Baseline.Status.DISABLED, diff --git a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/CheckEditorConfigTask.kt b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/CheckEditorConfigTask.kt index d65ffc2..479d754 100644 --- a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/CheckEditorConfigTask.kt +++ b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/CheckEditorConfigTask.kt @@ -43,6 +43,7 @@ public open class CheckEditorConfigTask @Inject constructor(objectFactory: Objec resultsFile.get().asFile.writeText("Failure") when (mode.get()) { None -> Unit + PrintWarningLogs -> logger.warn(messageFn()) BuildFailure, diff --git a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/workers/ConsoleReportWorker.kt b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/workers/ConsoleReportWorker.kt index 0058de3..f515914 100644 --- a/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/workers/ConsoleReportWorker.kt +++ b/ktlint-gradle-plugin/src/main/kotlin/io/github/usefulness/tasks/workers/ConsoleReportWorker.kt @@ -41,12 +41,14 @@ internal abstract class ConsoleReportWorker : WorkAction { when (lintError.status) { Status.BASELINE_IGNORED -> Unit + Status.LINT_CAN_NOT_BE_AUTOCORRECTED -> { hasUncoveredErrors = true logger.warn(lintError.generateMessage(file = file, message = "Format could not fix")) } Status.FORMAT_IS_AUTOCORRECTED -> logger.quiet(lintError.generateMessage(file = file, message = "Format fixed")) + Status.LINT_CAN_BE_AUTOCORRECTED, Status.KOTLIN_PARSE_EXCEPTION, Status.KTLINT_RULE_ENGINE_EXCEPTION,