fix(build): automatically manage trailing commas in ktfmt

This commit is contained in:
Harsh Shandilya 2024-05-28 15:11:21 +05:30
parent 09feaf89f6
commit de6cdfee0e

View file

@ -28,10 +28,14 @@ abstract class KtfmtWorkerAction : WorkAction<KtfmtWorkerParameters> {
Formatter.format( Formatter.format(
FormattingOptions( FormattingOptions(
style = FormattingOptions.Style.GOOGLE, style = FormattingOptions.Style.GOOGLE,
maxWidth = 100, maxWidth = FormattingOptions.DEFAULT_MAX_WIDTH,
blockIndent = 2,
continuationIndent = 2, continuationIndent = 2,
removeUnusedImports = true,
debuggingPrintOpsAfterFormatting = false,
manageTrailingCommas = true,
), ),
sourceText sourceText,
) )
if (!formattedText.contentEquals(sourceText)) { if (!formattedText.contentEquals(sourceText)) {