mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
fix: Remove noise from ktLintformat output
A user would struggle to determine what the error was if `ktLintFormat` failed `-q` (error only) is overkill as it removes useful output, but there is a large amount of warnings in the current version of the ktLint plugin GitHub ref: JLLeitschuh/ktlint-gradle/issues/457 This can be converted to `-w` (warnings only) afterwards A typical error is: ``` KtLint found code style violations. Please see the following reports: - C:\\...\ktlintTestSourceSetFormat\ktlintTestSourceSetFormat.txt ``` After adding `-w`, we'd also get the more useful: ``` CriticalExceptionTest.kt:19:1 Wildcard import (cannot be auto-corrected) ``` https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_logging Fixes #9093
This commit is contained in:
parent
1d21dd7629
commit
aa062db4e0
@ -11,7 +11,10 @@ fi;
|
||||
echo "Running Ktlint over these files:"
|
||||
echo "$CHANGED_FILES"
|
||||
|
||||
./gradlew ktlintFormat
|
||||
# -q removes noise from the output if it fails.
|
||||
# TODO: -w is better, but https://github.com/JLLeitschuh/ktlint-gradle/issues/457 adds noise
|
||||
# -w should display: "CriticalExceptionTest.kt:19:1 Wildcard import (cannot be auto-corrected)"
|
||||
./gradlew -q ktlintFormat
|
||||
|
||||
echo "Completed ./gradlew ktlintFormat run."
|
||||
echo "$CHANGED_FILES" | while read -r file; do
|
||||
|
Loading…
Reference in New Issue
Block a user