Scalafmt v2.4.0-RC2
Edition 2020-01
Formatting and rewrite of single-line curly lambdas
Allow curly lambdas to format on a single line
RedundantBraces: Replace inner braces and parens with outer braces for single-line lambdas (previously, only multiline)
RedundantBraces: Format single-line curly lambdas using parens
Other apply and init rewrites
RedundantParens: Remove parens around an apply of block
RedundantBraces: Remove braces around an apply argument
RedundantBraces: Remove braces around a single-statement lambda in constructors
Don't force break before parameters of lambda as the only constructor argument
Fixes
Pull Requests
- Rewrites: traverse tree once, applying all rules (#1677) @kitbellew
- RewriteTrailingCommas: trivial, remove duplicate (#1679) @kitbellew
- RedundantBraces: use () for {} one-line lambdas (#1663) @kitbellew
- Router: treat single-arg lambda of init like apply (#1666) @kitbellew
- Scalafmt is supported by format-all for emacs (#1675) @sideshowcoder
- ScalafmtConfig: clean up unused code, move some to tests (#1674) @kitbellew
- ScalafmtConfig bugfix: read align tokens as seq, not set (#1673) @kitbellew
- Trailing commas: add a rewrite rule, remove first (#1669) @kitbellew
- RedundantParens: rewrite single-arg apply of block (#1665) @kitbellew
- Minor improvements to split, decision and policy logic (#1661) @kitbellew
- RedundantBraces: update method body rewrite rules (#1662) @kitbellew
- Router: allow single-line curly lambdas (#1660) @kitbellew
Dependency updates
- Update metaconfig-core, ... to 0.9.5 (#1685) @scala-steward
- Update sbt-mima-plugin to 0.6.4 (#1683) @scala-steward
- Update sbt-ci-release to 1.5.2 (#1684) @scala-steward
- Update scalatags to 0.8.5 (#1680) @scala-steward
- Update sbt-scalajs to 1.0.0 (#1676) @scala-steward
- Update sbt to 1.3.8 (#1672) @scala-steward






