Releases: scalameta/scalafmt
Releases Β· scalameta/scalafmt
v3.5.5
RedundantParens: Bug fixes
- RedundantParens: fix bug with nested
Term.If
(#3226) @kitbellew - RedundantParens: don't allow breaks in infix sides (#3224) @kitbellew
- RedundantParens: don't rewrite cond in do-while (#3223) @kitbellew
RedundantParens: Other changes
- RedundantParens: handle blocks carefully (#3230) @kitbellew
- RedundantParens: handle more body expressions (#3229) @kitbellew
- RedundantParens: handle apply with multiple args (#3227) @kitbellew
- RedundantParens: rewrite bodies of if/while/case (#3225) @kitbellew
Other changes
- Documentation: remove spurious duplicate example (#3231) @kitbellew
v3.5.4
RedundantParens
- RedundantParens: add infixSide parameter to control readability (#3219) @kitbellew
- RedundantParens: fix bugs introduced in v3.5.3 (#3216) @kitbellew
- TreeOps: fix statement start for
foo(func)
(#3217) @kitbellew
Dealing with parser change to positions of paren-enclosed trees
- Scalameta: upgrade to v4.5.7 (#3221) @kitbellew
- FormatTokens: check outside parens for enclosed (#3220) @kitbellew
- TreeOps: move findEnclosedXxx from RedundantParens (#3218) @kitbellew
- FormatTokens: implement isEnclosedInParens (#3214) @kitbellew
- TreeOps: implement isCallSiteLeft (#3212) @kitbellew
- FormatOps: check args paren position carefully (#3211) @kitbellew
Other changes
- FormatTokens: define getHead/getLast for Tokens (#3213) @kitbellew
- FormatTokens: implement prevNonCommentBefore (#3210) @kitbellew
- Update the issue template clarifying requirements (#3208) @kitbellew
- Update scalafmt-core to 3.5.3 (#3209) @scala-steward
v3.5.3
Bug fixes
- RedundantParens: detect enclosed trees properly (#3207) @kitbellew
- AvoidInfix: handle targs and multi-arg case (#3201) @kitbellew
- RedundantParens: handle infix arg if not enclosed (#3202) @kitbellew
- FormatOps: fix bug with block in if/while cond (#3206) @kitbellew
- Router: for scala3, move NL before macro to after (#3199) @kitbellew
- Imports: put
given
at end of sorted selectors (#3191) @kitbellew
Dynamic error reporting
- ScalafmtReflect: improve parseConfigWith error (#3197) @kitbellew
- ScalafmtReporter: allow null cause in 3-arg error (#3198) @kitbellew
- ScalafmtDynamicError: use instead of UnknownError (#3196) @kitbellew
- UnknownConfigError: improve the error message (#3194) @kitbellew
- ScalafmtReflect: don't wrap in UnknownError (#3195) @kitbellew
- CorruptedClassPath: pass URL instances, not String (#3193) @kitbellew
Dependency updates
- Scalameta: upgrade to v4.5.5 (#3200) @kitbellew
- Update scalafmt-core to 3.5.2 (#3190) @scala-steward
v3.5.2
Bug fixes
- Router: handle empty return type (procedure decl) (#3186) @kitbellew
- Scalameta: upgrade to v4.5.4 (#3187) @kitbellew
Other changes
- Update scalafmt-core to 3.5.1 (#3181) @scala-steward
v3.5.1
Bug fixes
- Scalameta: upgrade to v4.5.3 (#3180) @kitbellew
- fixes bug with infix parsing of
(())
and((a, b, ...))
- fixes bug with infix parsing of
v3.5.0
Features
- FormatOps: handle
if
as if noelse
whenkeep
(#3176) @kitbellew - Router: improve source=fold format of for-yield (#3170) @kitbellew
- Scalameta: upgrade to v4.5.1 (#3164) @kitbellew
- this changes handling of infix types for scala3
- Router: check formatInfix using the infix tree (#3163) @kitbellew
- Indents: implement matchSite (#3126) @kitbellew
AvoidInfix improvements
- AvoidInfix: implement allowInfixInPlaceholderArg (#3152) @kitbellew
- AvoidInfix: don't match if LHS can't be wrapped (#3151) @kitbellew
- AvoidInfix: don't wrap LHS if already wrapped (#3149) @kitbellew
- AvoidInfix: don't match if RHS has placeholder (#3148) @kitbellew
- AvoidInfix: refactor, use
::
match (#3147) @kitbellew - AvoidInfix: extract isWrapped, checkMatchingInfix (#3146) @kitbellew
- AvoidInfix: consolidate placeholder tests, extend (#3145) @kitbellew
- Rewrite: use scalameta PlaceholderChecks (#3131) @kitbellew
Bug fixes
- Router: use PenalizeNewlines to avoidInResultType (#3157) @kitbellew
- Config: in dynamic, allow stable or actual version (#3155) @kitbellew
- FormatWriter: allow code without leading space (#3150) @kitbellew
- Router: properly align block interpolations, too (#3127) @kitbellew
Other changes
- BestFirstSearch: cosmetic, extract enqueue method (#3172) @kitbellew
- Router: put isInfixApp and match into one unapply (#3171) @kitbellew
- Configuration: mention parameters for visit limits (#3144) @kitbellew
- Issue template: force using latest version, CLI (#3143) @kitbellew
Dependency updates
- Scalameta: upgrade to v4.5.2 (#3179) @kitbellew
- Bump actions/checkout from 2 to 3 (#3177) @dependabot
- Bump actions/download-artifact from 2.1.0 to 3 (#3178) @dependabot
- Update sbt-scalajs-crossproject to 1.2.0 (#3167) @scala-steward
- Update sbt-native-packager to 1.9.9 (#3166) @scala-steward
- Update sbt-assembly to 1.2.0 (#3165) @scala-steward
- Update mdoc, sbt-mdoc to 2.3.1 (#3168) @scala-steward
- Update sbt-buildinfo to 0.11.0 (#3133) @scala-steward
- Update scalafmt-core to 3.4.3 (#3139) @scala-steward
- Update mdoc, sbt-mdoc to 2.3.0 (#3138) @scala-steward
- Update sbt-scalajs to 1.9.0 (#3136) @scala-steward
- Update typesafe:config to 1.4.2 (#3135) @scala-steward
- Update sbt-native-packager to 1.9.8 (#3134) @scala-steward
- Update sbt-assembly to 1.1.1 (#3132) @scala-steward
- Update sbt to 1.6.2 (#3137) @scala-steward
- Scalameta: upgrade to 4.5.0 (#3130) @kitbellew
v3.4.3
Bug fixes
- Router: no
inInterpolation=allow
if scala3if
(#3115) @kitbellew
Ammonite parsing
Uses the parser in scalameta instead of splitting scripts on /\n@ /
. Preserves multiple consecutive @
now.
- Scalafmt: use ammonite parser to handle scripts (#3120) @kitbellew
- FormatAssertions: use filename to convert to input (#3121) @kitbellew
- Scalameta: upgrade to 4.4.35 (#3119) @kitbellew
- TokenTraverser: remove unnecessary iterator (#3118) @kitbellew
- FormatTokens: remove special case for BOF/EOF (#3117) @kitbellew
- Rewrite: expect a method to convert to Input (#3116) @kitbellew
v3.4.2
Bug fixes
- Format{Ops,Writer}: fix trailing comment indent (#3112) @kitbellew
- FormatOps: fix parentCtors exclusion rule (#3111) @kitbellew
- TreeOps: adjust the followedBySelectOrApply logic (#3110) @kitbellew
v3.4.1
Features
- CliArgParser: allow additional values for --mode (#3108) @kitbellew
- FormatOps: improve binpacking parentConstructors (#3094) @kitbellew
Bug fixes
- RedundantParens: check for placeholder in Apply (#3107) @kitbellew
- TreeOps: bugfix matching wrong type (#3102) @kitbellew
- Newlines: bugfix comparing wrong types (#3101) @kitbellew
- State: correctly compute line widths in strings and interpolations with strip margin (#3095) @kitbellew
- Router: use
early
to findwith
afterextends
(#3097) @kitbellew - Router: set interpolation indents correctly (#3092) @kitbellew
- Newlines: fully deprecate topLevelStatements (#3089) @kitbellew
Other changes
- Use Seq.newBuilder or prepend to get constant time (#3106) @kitbellew
- Implement changes from Intellij Code Inspection (#3104) @kitbellew
- MacroBenchmark: use Scalafmt.format vs formatCode (#3103) @kitbellew
- State: getColumns compute first line length once (#3096) @kitbellew
- State: refactor getColumnsWithStripMargin (cosmetic) (#3093) @kitbellew
- Tests: use assertEquals whenever possible (#3088) @kitbellew
Dependency updates
- Dependencies: update scalameta to v4.4.34 (#3109) @kitbellew
- Dependency: upgrade metaconfig to 0.10.0 (#3099) @kitbellew
v3.4.0
Features
- FormatOps: implement indentOperator.exemptScope (#3082) @kitbellew
- Router: implement newlines.inInterpolation logic (#3080) @kitbellew
- Add
docstrings.forceBlankLineBefore
, remove parameters deprecated before v3.0.0 (#3081) @kitbellew
Parameter changes
- added
indentOperator.exemptScope
- replaces removed
unindentTopLevelOperators
(true
->all
,false
->oldTopLevel
) - replaces deprecated
indentOperator.topLevelOnly
(true
->oldTopLevel
,false
->all
)
- replaces removed
docstrings.forceBlankLineBefore
- replaces removed
optIn.blankLineBeforeDocstring
- replaces deprecated
optIn.forceBlankLineBeforeDocstring
- replaces removed
newlines.inInterpolation
- removed
newlines.alwaysBeforeCurlyBraceLambdaParams
- use
newlines.beforeCurlyLambdaParams = always/never
- use
verticalMultiline.newline{Before,After}ImplicitKW
- use
newlines.implicitParamListModifierForce=[{before,after}]
- use
verticalMultiline.excludeDanglingParens
- use
danglingParentheses.exclude
- use
Bug fixes
- Preserve indentation inside codeblocks (#3084) @dos65
- Router: keep
case if
newline if source=keep (#3085) @kitbellew - Router: keep newline after
if
if source=keep (#3083) @kitbellew
Other changes
- ScalafmtConfigTest: move to config sub-package (#3087) @kitbellew
- ConfError.message: replace with Configured.error (#3086) @kitbellew
- Switch formatting to 3.3.3 (#3077) @kitbellew
- Installation: update package sizes as of 2022 (#3078) @kitbellew
- Add tests for end markers around comments (#3076) @kitbellew