v3.8.1
New features
- ScalafmtOptimizer: rename forceConfigStyleOnOffset (#3874) @kitbellew
- RemoveScala3OptionalBraces: handle fewer braces (#3815) @kitbellew
- FormatTokensRewrite: check rewritten tokens sorted (#3871) @kitbellew
- FormatTokensRewrite: simplify claiming on right (#3870) @kitbellew
- FormatTokensRewrite: track source index explicitly (#3869) @kitbellew
- RedundantBraces: remove parens and trailing comma (#3868) @kitbellew
- Router: break on
(lambda
to keep trailing comma (#3855) @kitbellew - FormatOps: fix leading infix before fewer braces (#3859) @kitbellew
- FormatWriter: trailing comma with a removed paren (#3858) @kitbellew
- FormatWriter: keep braces if trailingCommas=Always (#3856) @kitbellew
- RedundantBraces: claim left brace inside parens (#3867) @kitbellew
- FormatTokensRewrite: return index, vs rule applied (#3866) @kitbellew
- FormatTokensRewrite: onRight proxy in Replacement (#3865) @kitbellew
- FormatTokensRewrite: pass FormatToken to resurrect (#3864) @kitbellew
- FormatTokensRewrite:
claim
implicit FormatToken (#3863) @kitbellew - FormatTokensRewrite: reuse index claimed earlier (#3860) @kitbellew
- FormatTokensRewrite: obtain rule from Replacement (#3862) @kitbellew
- FormatTokensRewrite: token index in Replacement (#3861) @kitbellew
- FormatTokensRewrite: token map expects left token (#3857) @kitbellew
- Test preserving non-folding trailing comma (#3849) @kitbellew
- RewriteTrailingCommas: take over check, refactor (#3854) @kitbellew
- TreeOps: rename, improve
endsWithFewerBraces
(#3853) @kitbellew - FormatTokensRewrite: define
Replacement.isRemove
(#3851) @kitbellew - FormatTokensRewrite: add getClaimed method (#3848) @kitbellew
- Rewrite rules: pass FormatTokens as implicit (#3847) @kitbellew
- FormatTokensRewrite: find only enabled rules (#3846) @kitbellew
- RemoveScala3OptionalBraces: allow leading infix op (#3840) @kitbellew
- RedundantBraces: fix "moving" braces around func (#3834) @kitbellew
- FormatTokensRewrite: ScalafmtConfig in Replacement (#3838) @kitbellew
- FormatTokensRewrite: update claims in
onRight
(#3835) @kitbellew - FormatTokensRewrite: "claim" index in
tokens
(#3830) @kitbellew - FormatTokensRewrite: move Rule into Replacement (#3828) @kitbellew
- FormatTokensRewrite: keep each token's replacement (#3827) @kitbellew
- FormatTokensRewrite: sort rule factories (#3826) @kitbellew
- FormatWriter: mind rewritten tokens for {} -> () (#3822) @kitbellew
- FormatTokensRewrite: include all rules in Session (#3816) @kitbellew
- RemoveScala3OptionalBraces: move next token check (#3814) @kitbellew
- RewriteScala3Settings: expand RemoveOptionalBraces (#3813) @kitbellew
- FormatTokensRewrite: add
createIfRequested()
(#3808) @kitbellew
- SortSettings: implement the
styleGuide
preset (#3797) @kitbellew- SortSettings: add
erased
(#3796) @kitbellew
- SortSettings: add
Bug fixes
- Scalameta: upgrade to v4.9.3 (#3875) @kitbellew
- Scalameta: upgrade to v4.9.2 (#3839) @kitbellew
Miscellaneous
- Docs: use parens, not brackets for
since vX.Y.Z
(#3873) @kitbellew - Docs: mention version for
fewerBracesMin/MaxSpan
(#3872) @kitbellew - Replace scalafiddle reference with scastie (#3843) @sake92
- LoggerOps: use Token.structure for logging (#3850) @kitbellew
- FormatOps: simplify
functionExpire
(#3841) @kitbellew - FormatTokens: modify getHead/getLast (#3837) @kitbellew
- TreeOps: extract both braces in SingleArgInBraces (#3836) @kitbellew
- FormatTokens: add nextNonCommentAfter (#3833) @kitbellew
- FormatTokens: import TokenOps._ (#3832) @kitbellew
- FormatTokens: getDelimsIfEnclosed (#3831) @kitbellew
- DynamicSuite: test newer versions without problems (#3823) @kitbellew
:
could be from the single term in ArgClause (#3805) @kitbellew- TreeOps: in SingleArgInBraces, check rewrites (#3809) @kitbellew
- FormatOps: pass FormatTokens as implicit (#3807) @kitbellew
- TreeOps: add
isEmptyTree
and function body (#3806) @kitbellew }
could be from a block arg or splice (#3804) @kitbellew- FormatWriter: fix top-level identification logic (#3802) @kitbellew
- ScalafmtConfig: use Sbt dialect for .sbt files (#3795) @kitbellew
- Documentation: add min version for
styleGuide
(#3798) @kitbellew - Scalafmt: use .forSbt for .sbt files only (#3792) @kitbellew
- Scalafmt: remove unused methods (#3791) @kitbellew
- SortSettings: create a variable for each modifier (#3793) @kitbellew
- Documentation: expand section on
SortModifiers
(#3794) @kitbellew
Dependency updates
- Update scala-library, scala-reflect to 2.13.13 (#3818) @scalameta-bot
- Update scalafmt-core to 3.8.0 (#3820) @scalameta-bot
- Update scalameta, testkit to 4.9.1 (#3821) @scalameta-bot
- Update sbt to 1.9.9 (#3819) @scalameta-bot
- Update scala-library, scala-reflect to 2.12.19 (#3817) @scalameta-bot
- Bump release-drafter/release-drafter from 5 to 6 (#3803) @dependabot