v3.8.2
Features
- Change
binpack=oneline
formatting- FormatOps: raise NL cost for binpacked ctrl body (#4048) @kitbellew
- Router: fix binpack=oneline continuation handling (#4047) @kitbellew
- FormatOps: extract and improve oneline break policy (#4046) @kitbellew
- Router: implement
binpack=onelineSjs
conf option (#4045) @kitbellew - Router: refactor handling of binpack comma args (#4044) @kitbellew
- Router: bp=oneline multi-line arg ends before
)
(#4043) @kitbellew - FormatOps: refactor GetSelectLike (#4042) @kitbellew
- Documentation: add detail to
binPack.xxxSite
(#4040) @kitbellew - BinPack: improve choice of correct XxxSite param (#4034) @kitbellew
- Router: bp: to prefer space, define nl split first (#4031) @kitbellew
- Router: fix bp.callsite=oneline post-comma policy (#4012) @kitbellew
- Router: fix bp.callsite=oneline penalty bug (#4004) @kitbellew
- Router: extend single line for bp.defnsite=oneline (#4000) @kitbellew
- Router: fix bp.defnsite=oneline inconsistency bug (#4002) @kitbellew
- FormatOps: use src=keep to open break for scala.js (#4001) @kitbellew
- Router: refactor binpack.defnsite=oneline logic (#3996) @kitbellew
- Router: fix handling of binpack=oneline (#3992) @kitbellew
- Router: binpack=oneline: add explicit state names (#3991) @kitbellew
- Router: inline binpack nl policies (#3990) @kitbellew
- Router: Align binpack.{call,defn}Site behaviour (#3977) @kitbellew
- BinPack: add string presets (always/never/oneline) (#3985) @kitbellew
- FormatOps: fix scala.js style implementation (#3980) @kitbellew
- Align binpack formatting for
callSite
anddefnSite
- Router: clause site: refactor dangle indicators (#3982) @kitbellew
- FormatOps: expand config-style source detection (#3981) @kitbellew
- Router: treat infix argument clause like any other (#3978) @kitbellew
- Router: binpack callsite: move no-split indents (#3976) @kitbellew
- Router: binpack defnsite: generalize slb indicator (#3975) @kitbellew
- Router: binpack callsite: fix literalsSingleLine (#3974) @kitbellew
- Router: binpack callsite: Spc for attached comment (#3973) @kitbellew
- Router: binpack defnsite: rename mustUseNL->nlOnly (#3972) @kitbellew
- Router: binpack: refactor policies, newline split (#3971) @kitbellew
- FormatOps: pass close-break indicator for cfgstyle (#3970) @kitbellew
- DanglingParentheses: add bracketSite versions (#3969) @kitbellew
- FormatTokens: add more methods around comments (#3968) @kitbellew
- Router: add hasBreak, noBreak, hasBlankLine (#3967) @kitbellew
- FormatOps: use token index instead of hash (#3966) @kitbellew
- DanglingParentheses: bundle defnSite with excludes (#3965) @kitbellew
- Tests: add extra without dangling, remove obsolete (#3964) @kitbellew
- Router: refactor, replace formatToken/tok with ft (#3963) @kitbellew
- Config-style: allow optimizing defn site clause (#3962) @kitbellew
- Config-style: control over forcing vs optimization (#3961) @kitbellew
- Config-style: separate control for call/defn sites (#3960) @kitbellew
- Config-style: refactor, prepare for more control (#3959) @kitbellew
- ScalafmtConfig: shorten the allowed maxColumn (#3958) @kitbellew
- {Format,Tree}Ops: use token index instead of hash (#3957) @kitbellew
- FormatOps: use FormatToken.Meta in ExtractFromMeta (#3956) @kitbellew
- Newlines: add more keepBreak overloads (#3955) @kitbellew
- Add more variants in tests for binPack.defnSite (#3953) @kitbellew
- Router: fix scala.js style for binPack.callSite (#3931) @kitbellew
- FormatOps: prefer ConfigStyle.Force over Source (#3929) @kitbellew
- FormatOps: add method to get flags for bp=callsite (#3928) @kitbellew
- Add more variants in tests for binPack.callSite (#3927) @kitbellew
- Documentation: describe
binPack.xxxSite
(#3905) @kitbellew - FormatOps: separate config style: exists or forced (#3904) @kitbellew
- Router: refactor nlPolicy for binpack.callSite (#3903) @kitbellew
- Test binPack.xxxSite with configStyleArguments (#3902) @kitbellew
- BinPack: drop
unsafe
prefix in call/defn sites (#3900) @kitbellew - BinPack: remove stale warning about unsafeXxxSite (#3899) @kitbellew
- Documentation: describe formatting algorithm (#3951) @kitbellew
Bug fixes
- FormatOps: handle enclosed folded body differently (#4039) @kitbellew
- FormatOps: pass Tuples to
argumentStarts
as well (#4025) @kitbellew - Router: add NL split in select chain for src=keep (#4021) @kitbellew
- PreferCurlyFors: don't rewrite if has infix (#4018) @kitbellew
- Split: block optimal token with non-zero cost (#4020) @kitbellew
- PreferCurlyFors: don't rewrite semicolon only (#4013) @kitbellew
- FormatOps: return for fewer braces infix lhs early (#4015) @kitbellew
- Router: use indentCallSiteOnce to callsite only (#4005) @kitbellew
- Fix #3465
- FormatWriter: merge columns at different depth (#3925) @kitbellew
- FormatWriter: match columns in tryAppendToBlock (#3924) @kitbellew
- FormatWriter: share shifted columns between lines (#3923) @kitbellew
- FormatWriter: use a "merge" in tryAppendToBlock (#3922) @kitbellew
- FormatWriter: minor refactor, rename variables (#3921) @kitbellew
- FormatWriter: add
ft
method to AlignStop (#3920) @kitbellew - FormatWriter: move logic to getAlignNonSlcOwner (#3919) @kitbellew
- FormatWriter: add style, get overflow in AlignLine (#3918) @kitbellew
- FormatWriter: add non-SLC owner to AlignStop (#3917) @kitbellew
- FormatWriter: don't insert braces in annotation (#3913) @kitbellew
- FormatWriter: inline getAlignContainer(fmt loc) (#3916) @kitbellew
- FormatWriter: simplify, add to empty block only (#3915) @kitbellew
- FormatWriter: rename location to floc, consistency (#3914) @kitbellew
- Router: fix configStyle/binPack.callSite/src=keep (#3906) @kitbellew
- Router: fix fold bug after semicolon (#3910) @kitbellew
- RedundantBraces: ignore block under Term.Xml (#3893) @kitbellew
- FormatOps: can't look at breaks for fold/unfold (#3889) @kitbellew
Miscellaneous
- Policy: handle booleans, add WithConv, Expire, description labels (#4041) @kitbellew
- BestFirstSearch: clean-up "UNABLE TO FORMAT" msg (#4038) @kitbellew
- TreeOps: move getArgs from FormatOps, make partial (#4035) @kitbellew
- PolicySummary: return only splits in
execute
(#4037) @kitbellew - Router: no need to bind a new var for FormatTokens (#4036) @kitbellew
- ReaderUtil: refactor, expose custom value parsing (#4033) @kitbellew
- Error: simplify parameters of SearchStateExploded (#4032) @kitbellew
- PolicyOps: move penalizeNewlineByNesting (#4026) @kitbellew
- StyleMap: refactor checking basic/complex literals (#4019) @kitbellew
- Split: don't check presence in set separately (#4016) @kitbellew
- FormatAssertions: adjust line range before caret (#4014) @kitbellew
- Policy: add a Map policy, use instead of Proxy (#4011) @kitbellew
- Policy: add a RelayOnSplit policy (#4010) @kitbellew
- Policy: use new convenient binary End operators (#4009) @kitbellew
- Policy: add a Split parameter to
unexpired()
(#4008) @kitbellew - Policy: use common logic for all methods in Or/And (#4007) @kitbellew
- Policy: add convenient binary operators for End (#4006) @kitbellew
- FormatOps: in CtrlBodySplits, add consistency (#4003) @kitbellew
- FormatOps: add all arguments to
argumentStarts
(#3994) @kitbellew - FormatOps: return FormatToken in findFirstOnRight (#3999) @kitbellew
- FormatOps: process all clauses together (#3998) @kitbellew
- BestFirstSearch: access incremental cost directly (#3997) @kitbellew
- Router: get return type only on colon (#3995) @kitbellew
- Router: tighten range for parent-ctors policy (#3993) @kitbellew
- TreeOps: get last tree in followedBySelectOrApply (#3989) @kitbellew
- PolicyOps: add
decideNewlinesOnlyBeforeToken
(#3988) @kitbellew - Router/FormatOps: import all
tokens._
symbols (#3987) @kitbellew - FormatOps: look for keyword past enclosing parens (#3984) @kitbellew
- FormatOps: extend body indent to end of line (#3983) @kitbellew
- FormatOps: create auxilliary class ClauseSiteFlags (#3979) @kitbellew
- Docstrings: implement the fold option to Wrap (#3952) @kitbellew
- Docstrings: use keep/fold/unfold in BlankFirstLine (#3947) @kitbellew
- BestFirstSearch: minor optimization with HashMap (#3950) @kitbellew
- ScalafmtOptimizer: remove unused code (#3949) @kitbellew
- Add a bit more structure to own docstrings (#3948) @kitbellew
- HasTests: show line number with config error (#3946) @kitbellew
- BestFirstSearch: switch to Long as State key (#3942) @kitbellew
- BestFirstSearch: use overridden ScalafmtConfig (#3945) @kitbellew
- BestFirstSearch: refactor optimization zones code (#3943) @kitbellew
- Router: to debug, use FileLine in binpack policies (#3930) @kitbellew
- Newlines: add method okSpaceForSource(newlines) (#3909) @kitbellew
- Modification: add conditional ctor to Newline2x (#3908) @kitbellew
- Documentation: add more context for
source=keep
(#3898) @kitbellew - Documentation: advise reading entire page first (#3897) @kitbellew
- Router: use built-to FormatToken.toString (#3892) @kitbellew
- scalafmt: enable AvoidInfix rewrite (#3890) @kitbellew
- scalafmt: enable
Imports
rewrite (#3888) @kitbellew - scalafmt: enable trailing commas rewrite (#3887) @kitbellew
- scalafmt: enable RedundantBraces rewrite (#3886) @kitbellew
- scalafmt: align strip margins (#3885) @kitbellew
- scalafmt: enable newlines.source=fold formatting (#3884) @kitbellew
- scalafmt: don't ignore newlines in syntax (#3883) @kitbellew
- scalafmt: enable RedundantParens rewrite (#3882) @kitbellew
- scalafmt: enable SortModifiers with
styleGuide
(#3881) @kitbellew - scalafmt: avoid simple overflow (#3880) @kitbellew
- scalafmt: group parameters (#3879) @kitbellew
- scalafmt: upgrade version v3.8.1 (#3878) @kitbellew
- DynamicSuite: start testing with v3.8.1 (#3876) @kitbellew
Dependency updates
- Coursier: upgrade to v2.1.10 (#4051) @kitbellew
- Scalameta: upgrade to v4.9.6 (#4050) @kitbellew
- munit: upgrade to v1.0.0 (#4049) @kitbellew
- Update scalacheck to 1.18.0 (#4024) @scalameta-bot
- Scalameta: upgrade to v4.9.5 (#4017) @kitbellew
- Scalameta: upgrade to v4.9.4 (#3986) @kitbellew
- Github actions: explicitly use macOS-12 (#3944) @kitbellew
- Update sbt-buildinfo to 0.12.0 (#3934) @scalameta-bot
- Update scalacheck to 1.17.1 (#3938) @scalameta-bot
- Update sbt-assembly to 2.2.0 (#3933) @scalameta-bot
- Update sbt-scalajs to 1.16.0 (#3937) @scalameta-bot
- Update scalatags to 0.13.1 (#3936) @scalameta-bot
- Update sbt-native-packager to 1.10.0 (#3935) @scalameta-bot
- Add or update discord links (#3907) @kitbellew