diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2024-05-28 15:11:21 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2024-05-28 15:11:21 +0530 |
commit | de6cdfee0e37aab03bfb91e5e90c3ec4bd740fe3 (patch) | |
tree | 2f6ccfc3dc80f8db0c3805b654d5f3ba0aa79202 /build-logic/src/main | |
parent | 09feaf89f64713a3d02fbd3218ecc3f816d6ad7d (diff) |
fix(build): automatically manage trailing commas in ktfmt
Diffstat (limited to 'build-logic/src/main')
-rw-r--r-- | build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerAction.kt | 8 |
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)) { |