Skip to content

Commit

Permalink
[KYUUBI #6674] Bump Scalafmt to 3.9.x
Browse files Browse the repository at this point in the history
# 🔍 Description
## Issue References 🔗

This pull request fixes #

## Describe Your Solution 🔧

Without this PR:
- use and conform Scalafmt 3.7.x
- forcing all the imports from the same parent package, which is even violation the max length of the line

With this PR:
- use and conform Scalafmt 3.9.x
- Scalafmt 3.8.2 changes the binpack style: https://github.com/scalameta/scalafmt/releases/tag/v3.8.2
- change to `binPack.importSelectors=singleLine`, minimizing the impacts to existed code

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6674 from bowenliang123/scalafmt38.

Closes #6674

d9f4f9d [Bowen Liang] 3.9.0
438a07d [Bowen Liang] reformat
2df5066 [liangbowen] bump scalafmt to 3.8

Lead-authored-by: Bowen Liang <[email protected]>
Co-authored-by: liangbowen <[email protected]>
Signed-off-by: Bowen Liang <[email protected]>
  • Loading branch information
bowenliang123 committed Feb 20, 2025
1 parent ed96ac1 commit 0f4906d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.5
version = 3.9.0
runner.dialect=scala212
project.git=true

Expand All @@ -11,7 +11,7 @@ assumeStandardLibraryStripMargin = true
danglingParentheses.preset = false
docstrings.style = Asterisk
docstrings.wrap = no
importSelectors = singleLine
binPack.importSelectors = singleLine
indent.extendSite = 2
literals.hexDigits = Upper
maxColumn = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ object AssertionUtils {
path: Path,
expectedLines: Traversable[String],
regenScript: String,
splitFirstExpectedLine: Boolean = false)(implicit
prettifier: Prettifier,
pos: Position): Unit = {
splitFirstExpectedLine: Boolean =
false)(implicit prettifier: Prettifier, pos: Position): Unit = {
val fileSource = Source.fromFile(path.toUri, StandardCharsets.UTF_8.name())
try {
def expectedLinesIter = if (splitFirstExpectedLine) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
<spotless.python.includes></spotless.python.includes>
<spotless.python.black.version>22.3.0</spotless.python.black.version>
<!-- Please also update .scalafmt.conf when you change it here -->
<spotless.scala.scalafmt.version>3.7.5</spotless.scala.scalafmt.version>
<spotless.scala.scalafmt.version>3.9.0</spotless.scala.scalafmt.version>

<distMgmtReleaseId>apache.releases.https</distMgmtReleaseId>
<distMgmtReleaseName>Apache Release Distribution Repository</distMgmtReleaseName>
Expand Down

0 comments on commit 0f4906d

Please sign in to comment.