Releases: scalameta/scalafmt
Releases Β· scalameta/scalafmt
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
v3.3.3
Bug fixes
- Router: disallow breaks in args in binpack=oneline (#3067) @kitbellew
- FormatWriter: idempotent wrapSingleLineMlcAsSlc (#3068) @kitbellew
Other changes
- Documentation: remove claim about default version (#3069) @kitbellew
Dependency updates
- Update sbt-scalafmt to 2.4.6 (#3075) @scala-steward
- Update scalatags to 0.11.1 (#3072) @scala-steward
- Update sbt to 1.6.1 (#3074) @scala-steward
- Update scala-library, scala-reflect to 2.13.8 (#3073) @scala-steward
v3.3.2
Features
- Router: implement
align.beforeOpenParenXxxSite
(#3052) @kitbellew - FormatWriter: in SLC, insert space before non-
/
(#3051) @kitbellew - RedundantBraces: add noParams option to defnBodies (#3031) @kitbellew
Format scala3 while-do/if-then/for-do consistently
- Router: handle
for-do/yield
the same aswhile
(#3050) @kitbellew - FormatOps: unfold yield correctly and consistently (#3047) @kitbellew
- Router: preserve break after
while
ifkeep
(#3049) @kitbellew - Router: handle then and do similar to else/yield (#3037) @kitbellew
- FormatOps: use Option in indentAndBreakBeforeCtrl (#3048) @kitbellew
Scaladoc with embedded elements
- Scalameta: upgrade to 4.4.32 (scaladoc fixes) (#3054) @kitbellew
- FormatWriter: refactor scaladoc formatting, escape text a-la code fence (#3036) @kitbellew
- FormatWriter: do not start "```" on top line (part 7) (#3046) @kitbellew
- FormatWriter: pass indent parameter to scaladoc (part 6) (#3045) @kitbellew
- FormatWriter: reuse scaladoc formatTextAfterMargin (part 5) (#3044) @kitbellew
- FormatWriter: refactor formatting a code block (part 4) (#3043) @kitbellew
- FormatWriter: extract logic to terminate a MLC (part 3) (#3042) @kitbellew
- FormatWriter: remove appendWithMargin for scaladoc (part 2) (#3041) @kitbellew
- FormatWriter: refactor, extract Scaladoc format (part 1) (#3040) @kitbellew
Bug fixes
- Scalameta: upgrade to 4.4.33 (scala3 comment fix) (#3064) @kitbellew
- Router: observe source=keep even when binpacking (#3065) @kitbellew
- StyleMap: fix style.binPack.literalsMinArgCount (#3062) @kitbellew
- FormatOps: bugfixes to deal with ephemeral single-stat blocks with trailing comments (#3058) @kitbellew
- Router: indent, handle comma in repeated enum cases (#3057) @kitbellew
- Router: if format:off and NL, keep only NL splits (#3029) @kitbellew
Other changes
- StyleMap: include
new
as a simple literal expr (#3060) @kitbellew - Documentation: describe all literal arglist params (#3061) @kitbellew
- FileOps: support symlinked files or directories (#3055) @kitbellew
- Installation: clarify sbt plugin version (#3039) @kitbellew
- ScalafmtConfig: simplify check for beforeMultiline (#3038) @kitbellew
- RedundantBraces: rename some parameters, amend documentation (#3030) @kitbellew
- HasTests: avoid NPE for incomplete formatting (#3028) @kitbellew