Releases: scalameta/scalafmt
Releases · scalameta/scalafmt
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
v3.8.0
Features
- ConvertToNewScala3Syntax: use the new granular parameter (#3735) @kitbellew
- #3712
- AvoidInfixSettings: use scalatest ops in test only (#3739) @kitbellew
- AvoidInfixSettings: relax
forSbtOpt
append rule (#3737) @kitbellew - ProjectFiles: detect if source is test in Layout (#3738) @kitbellew
- RewriteSettings: rename
forSbt
toforSbtOpt
(#3719) @kitbellew - AvoidInfixSettings: refactor defaults (#3718) @kitbellew
- AvoidInfixSettings: add
behavior.of
to default (#3711) @kitbellew - AvoidInfixSettings: consolidate AvoidInfix params (#3717) @kitbellew
- StandardProjectLayoutTest: rename to fix typo (#3716) @kitbellew
- ProjectFiles: shorten len in recursive getLang (#3715) @kitbellew
- ProjectFiles: implement Layout.withLang (#3714) @kitbellew
- ProjectFiles: refactor getting parent dirs (#3713) @kitbellew
- NeverInfixPattern: allow to match lhs as well (#3705) @kitbellew
- StandardProjectLayoutTest: add tests (#3706) @kitbellew
- AbsoluteFile: add
apply(String*)
(#3708) @kitbellew - NeverInfixPattern: implement own matching method (#3704) @kitbellew
- AvoidInfix: add tests for
of
(#3703) @kitbellew - NeverInfixPattern: rename from ambiguous
Pattern
(#3702) @kitbellew - Regex: use pattern.matcher.find, not findFirstIn (#3701) @kitbellew
Bug fixes
- FormatOps: fix fewer-braces lambda argument (#3782) @kitbellew
- Scalameta: update to 4.9.0 (#3781) @kitbellew
- Contains a number of parsing and interface fixes
- TreeOps: define
SingleArgInBraces
tree matcher (#3776) @kitbellew
- RedundantBraces: remove inner braces, not outer (#3780) @kitbellew
- FormatOps: fix
functionExpire
when rewritten (#3773) @kitbellew - Use Term.FunctionTerm where Term.Function was used (#3771) @kitbellew
- Use an sbt-scalafmt badge that shows the actual latest version (#3769) @taig
- FormatOps: force NL for non-single-expr in finally (#3761) @kitbellew
- RedundantParens: exclude case of trailing commas (#3750) @kitbellew
- RewriteTrailingCommas/RedundantParens: collaborate (#3760) @kitbellew
- TreeOps: relax when trailing comma paren possible (#3755) @kitbellew
- FormatOps: set indent correctly for enclosed body (#3754) @kitbellew
- Add tests with trailing commas in tuple (#3759) @kitbellew
- FormatOps: in getArgs, optionally return Nil (#3756) @kitbellew
- FormatTokensRewrite: claim current token as well (#3753) @kitbellew
- FormatTokensRewrite: create Session, pass around (#3752) @kitbellew
- FormatOps: outindent after fewer braces in infix (#3740) @kitbellew
- Scalameta: update to v4.8.15 (#3741) @kitbellew
- bugfix: Show exception from path matcher correctly (#3729) @tgodzik
- FormatWriter: fix end marker handling (#3734) @kitbellew
Miscellaneous
- FormatOps: inline
opensConfigStyle{,Classic}
(#3784) @kitbellew - FormatOps: getMustDangleForTrailingCommas(Token) (#3783) @kitbellew
- RedundantBraces: processBlock never called on
}
(#3779) @kitbellew - RedundantBraces: add
canRewriteXyzWithParens
(#3778) @kitbellew - RedundantBraces: extract method checking line span (#3777) @kitbellew
- FormatWriter: check stats in top-level handling (#3775) @kitbellew
- TreeOps: use DRY in checking function in braces (#3774) @kitbellew
- TreeOps: add method
isParentAnApply
(#3772) @kitbellew - FormatTests: improve idempotency and other errors (#3770) @kitbellew
- FormatTests: check AST only if result is parsable (#3758) @kitbellew
- FormatTests: ease check when test fails to parse (#3757) @kitbellew
- FormatTokens: add prevNonCommentSameLineBefore (#3751) @kitbellew
- FormatTests: improve asserting idempotency failure (#3736) @kitbellew
- Docs: increase
maxColumn
to showcase alignment (#3733) @kitbellew - improvement: Warn users not to use an example config without discussion (#3710) @tgodzik
Depedency updates
- Update mdoc, mdoc-parser, sbt-mdoc to 2.5.2 (#3768) @scalameta-bot
- Update sbt-jmh to 0.4.7 (#3749) @scalameta-bot
- Update sbt to 1.9.8 (#3748) @scalameta-bot
- Update sbt-scalajs to 1.15.0 (#3747) @scalameta-bot
- Bump actions/download-artifact from 3 to 4 (#3742) @dependabot
- Update scalafmt-core to 3.7.17 (#3726) @scalameta-bot
- Update mdoc-parser to 2.5.1 (#3725) @scalameta-bot
- Update mdoc, sbt-mdoc to 2.5.1 (#3724) @scalameta-bot
- Update sbt-assembly to 2.1.5 (#3723) @scalameta-bot
- Bump actions/setup-java from 3 to 4 (#3721) @dependabot
v3.7.17
Bug fixes
- Cli: version is necessary, may not be sufficient (#3696) @kitbellew
- Scalameta: update to v4.8.14 (#3695) @kitbellew
- ScalafmtReflect: lazily load obsolete class (#3690) @kitbellew
- DynamicSuite: test nightly version via local build (#3691) @kitbellew
v3.7.16
Features
- YML: Add java21 to the build (#3687) @kitbellew
Bug fixes
- Scalameta: update to v4.8.13 (#3686) @kitbellew
- MarkdownParser: add formatter using mdoc parser (#3684) @kitbellew
- InputMethod: check for empty diff (#3683) @kitbellew
- ConfParsed: don't mask parsing/retrieval errors (#3681) @kitbellew
Miscellaneous
- YML: Make java11 primary, remove java8 (#3685) @kitbellew
- Error: include doc url in SearchStateExploded msg (#3682) @kitbellew
- Config: move all methods into ScalafmtConfig (#3680) @kitbellew
Dependency updates
- Update typesafe:config to 1.4.3 (#3677) @scalameta-bot
- Update scalafmt-core to 3.7.15 (#3679) @scalameta-bot
- Update sbt to 1.9.7 (#3678) @scalameta-bot
- Update sbt-assembly to 2.1.4 (#3676) @scalameta-bot
v3.7.15
Bug fixes
- RewriteTrailingCommas: allow tuples as well (#3665) @kitbellew
- FormatOps: fix Defn as optional braces block (#3658) @kitbellew
- Scalafmt: don't parse shebang line as scala (#3657) @kitbellew
- ScalafmtConfig: fix withoutRewrites (#3654) @kitbellew
Miscellaneous
- TokenClasses: don't use classifiers (#3667) @kitbellew
- Scalafmt: handle empty code differently (#3656) @kitbellew
- HasTests: locations could be null (#3655) @kitbellew
- Add a full structure test for intermittent failure (#3635) @kitbellew
- CliArgParser: clarify
--stdin
description (#3633) @kitbellew
Dependency updates
- Scalameta: update to v4.8.12 (#3666) @kitbellew
- Update: metaconfig to v0.12.0, mdoc to v2.4.0 (#3668) @kitbellew
- Update sbt-scalajs to 1.14.0 (#3648) @scalameta-bot
- Update sbt-assembly to 2.1.3 (#3647) @scalameta-bot
- Update sbt to 1.9.6 (#3650) @scalameta-bot
- Update scalafmt-core to 3.7.14 (#3651) @scalameta-bot
- Update sbt-jmh to 0.4.6 (#3652) @scalameta-bot
- Bump docker/metadata-action from 4 to 5 (#3646) @dependabot
- Bump docker/login-action from 2 to 3 (#3645) @dependabot
- Bump docker/build-push-action from 4 to 5 (#3644) @dependabot
- Bump actions/checkout from 3 to 4 (#3643) @dependabot
- Scalameta: update to v4.8.11 (#3640) @kitbellew
v3.7.14
Bug fixes
- FormatOps: fewer-braces func not just in apply (#3624) @kitbellew
- Update scalameta, testkit to 4.8.10 (#3628) @scalameta-bot
Dependency updates
- Update scalafmt-core to 3.7.13 (#3627) @scalameta-bot
- Update sbt-scalafmt to 2.5.2 (#3626) @scalameta-bot
- Update sbt to 1.9.4 (#3625) @scalameta-bot
v3.7.13
Features
- Interfaces: add credentials to public interface (#3620) @kitbellew
- PolicyOps: use
newlines.ignoreInSyntax
(#3613) @kitbellew - Router: implement
spaces.beforeXxxArgInParens
(#3612) @kitbellew - FormatWriter: implement
align.delayUntilSpace
(#3616) @kitbellew
Bug fixes
- FormatWriter: accumulate align shift correctly (#3615) @kitbellew
Miscellaneous
- Installation: document COURSIER_REPOSITORIES (#3621) @kitbellew
- Update installation.md: avoid obsolete sbt shell syntax (#3619) @SethTisue
- TreeOps: remove isDefDef, use Member.ParamClause (#3611) @kitbellew
- Router: refactor modification before
(
(#3610) @kitbellew - ScalafmtConfig: display validation errors clearer (#3609) @kitbellew
- FormatWriter: FormatLocations.iterate to foreach (#3606) @kitbellew
- FormatWriter: append to empty align block (#3605) @kitbellew
Dependency updates
- Scalameta: upgrade to v4.8.9 (#3622) @kitbellew
- Scalameta: upgrade to v4.8.8 (#3617) @kitbellew
v3.7.12
Bug fixes
- Scalameta: upgrade to v4.8.7 (#3604) @kitbellew
- Fixed typo in configuration.md (#3595) @ThinkDumbIndustries
Miscellaneous
- Router: handle self-type whether it ends in
=>
(#3602) @kitbellew - FormatTokens: use Either.merge (#3596) @kitbellew
Dependency updates
- Update sbt-scalajs-crossproject to 1.3.2 (#3599) @scalameta-bot
- Update scalafmt-core to 3.7.11 (#3601) @scalameta-bot
- Update sbt to 1.9.3 (#3600) @scalameta-bot
- Update sbt-mima-plugin to 1.1.3 (#3598) @scalameta-bot
v3.7.11
Bug fixes
- Scalameta: upgrade to v4.8.6 (#3594) @kitbellew
- Indents: ignore fewerBraces if indentation is 1 (#3592) @kitbellew
Miscellaneous
- Remove use of deprecated PlatformTokenizerCache (#3593) @kitbellew
v3.7.10
Bug fixes
- Scalameta: upgrade to v4.8.5 (#3588) @kitbellew