Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Scalafmt mandatory in build (#1573)
- Loading branch information
Showing
757 changed files
with
5,106 additions
and
3,577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,61 @@ | ||
version = "3.0.2" | ||
|
||
maxColumn = 120 | ||
docstrings = ScalaDoc | ||
version = "3.5.2" | ||
runner.dialect = scala213source3 | ||
|
||
project.git = true | ||
preset = default | ||
|
||
# Alignment is cool, until we have to view diffs and solve merge conflicts | ||
align.preset = none | ||
align.tokens = [ | ||
{code = "<-"}, | ||
] | ||
|
||
# If true, the margin character | is aligned with the opening triple quote string literals | ||
assumeStandardLibraryStripMargin = true | ||
fileOverride { | ||
"glob:**/src/main/scala_3.0/**" { | ||
runner.dialect = scala3 | ||
}, | ||
"glob:**/*.sbt" { | ||
align.tokens = [ | ||
{code = "<-"}, | ||
{code = "="}, | ||
{code = "%", owners = [{regex = "Term.ApplyInfix"}]}, | ||
{code = "%%", owners = [{regex = "Term.ApplyInfix"}]} | ||
] | ||
}, | ||
"glob:**/project/*.scala" { | ||
align.tokens = [ | ||
{code = "<-"}, | ||
{code = "="}, | ||
{code = "%", owners = [{regex = "Term.ApplyInfix"}]}, | ||
{code = "%%", owners = [{regex = "Term.ApplyInfix"}]} | ||
] | ||
} | ||
} | ||
|
||
#From scalafmt website: | ||
#see: http://scalameta.org/scalafmt/#includeCurlyBraceInSelectChains | ||
includeCurlyBraceInSelectChains = false | ||
docstrings.style = keep | ||
maxColumn = 120 | ||
|
||
rewrite.rules = [ | ||
SortImports, | ||
AvoidInfix, | ||
] | ||
|
||
spaces.inImportCurlyBraces = true | ||
includeNoParensInSelectChains = false | ||
trailingCommas = preserve | ||
|
||
continuationIndent { | ||
callSite = 2 | ||
defnSite = 2 | ||
extendSite = 2 | ||
} | ||
|
||
danglingParentheses = false | ||
|
||
newlines { | ||
alwaysBeforeTopLevelStatements = false | ||
sometimesBeforeColonInMethodReturnType = true | ||
penalizeSingleSelectMultiArgList = false | ||
alwaysBeforeElseAfterCurlyIf = false | ||
neverInResultType = false | ||
} | ||
|
||
spaces { | ||
afterKeywordBeforeParen = true | ||
} | ||
|
||
binPack { | ||
parentConstructors = true | ||
literalArgumentLists = true | ||
} | ||
|
||
optIn { | ||
breaksInsideChains = false | ||
breakChainOnFirstMethodDot = true | ||
configStyleArguments = true | ||
blankLineBeforeDocstring = true | ||
forceBlankLineBeforeDocstring = false | ||
} | ||
|
||
runner { | ||
optimizer { | ||
# Set to -1 to disable. Number of characters needed to trigger "config-style" formatting | ||
# see: http://scalameta.org/scalafmt/#runner.optimizer.forceConfigStyleOnOffset | ||
forceConfigStyleOnOffset = 150 | ||
|
||
# minimum number of func arguments before config-style (look at top of file) is enabled | ||
forceConfigStyleMinArgCount = 2 | ||
} | ||
newlines { | ||
source = keep | ||
afterCurlyLambdaParams = preserve | ||
beforeCurlyLambdaParams = multilineWithCaseOnly | ||
topLevelBodyIfMinStatements = [] | ||
} | ||
|
||
lineEndings=preserve |
Oops, something went wrong.