Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit de6cdfe

Browse files
committed
fix(build): automatically manage trailing commas in ktfmt
1 parent 09feaf8 commit de6cdfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ abstract class KtfmtWorkerAction : WorkAction<KtfmtWorkerParameters> {
2828
Formatter.format(
2929
FormattingOptions(
3030
style = FormattingOptions.Style.GOOGLE,
31-
maxWidth = 100,
31+
maxWidth = FormattingOptions.DEFAULT_MAX_WIDTH,
32+
blockIndent = 2,
3233
continuationIndent = 2,
34+
removeUnusedImports = true,
35+
debuggingPrintOpsAfterFormatting = false,
36+
manageTrailingCommas = true,
3337
),
34-
sourceText
38+
sourceText,
3539
)
3640

3741
if (!formattedText.contentEquals(sourceText)) {

0 commit comments

Comments
 (0)