From d32b7966b8e2d4a8b0049f24e0c13600a690f0a4 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:36:10 -0700 Subject: [PATCH] scalafmt: group parameters, add extra These extra parameters do not yet change the formatting: - explicitly align strip margins - enable SortModifiers - avoid simple overflow - don't ignore newlines in syntax --- .scalafmt.conf | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 31cf066..922f8ff 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,14 +1,21 @@ version = 3.8.1 runner.dialect = scala213 -project.git = true -project.excludeFilters = [ - plugin/src/sbt-test -] +project { + git = true + excludeFilters = [ + plugin/src/sbt-test + ] +} +newlines { + avoidForSimpleOverflow = [punct, slc, tooLong] + ignoreInSyntax = false +} rewrite { rules = [ Imports, RedundantBraces, - RedundantParens + RedundantParens, + SortModifiers ] imports { sort = ascii @@ -19,7 +26,11 @@ rewrite { ["org\\..*"] ] } + sortModifiers.preset = styleGuide +} +align { + preset = none + stripMargin = true } -align.tokens = none assumeStandardLibraryStripMargin = true onTestFailure = "To fix this, run ./bin/scalafmt from the project root directory"