summaryrefslogtreecommitdiff
path: root/build-logic/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2024-05-28 15:11:21 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2024-05-28 15:11:21 +0530
commitde6cdfee0e37aab03bfb91e5e90c3ec4bd740fe3 (patch)
tree2f6ccfc3dc80f8db0c3805b654d5f3ba0aa79202 /build-logic/src
parent09feaf89f64713a3d02fbd3218ecc3f816d6ad7d (diff)
fix(build): automatically manage trailing commas in ktfmt
Diffstat (limited to 'build-logic/src')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt
index d9b265b7..ef7e63e7 100644
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt
@@ -28,10 +28,14 @@ abstract class KtfmtWorkerAction : WorkAction<KtfmtWorkerParameters> {
Formatter.format(
FormattingOptions(
style = FormattingOptions.Style.GOOGLE,
- maxWidth = 100,
+ maxWidth = FormattingOptions.DEFAULT_MAX_WIDTH,
+ blockIndent = 2,
continuationIndent = 2,
+ removeUnusedImports = true,
+ debuggingPrintOpsAfterFormatting = false,
+ manageTrailingCommas = true,
),
- sourceText
+ sourceText,
)
if (!formattedText.contentEquals(sourceText)) {