From 0f4906d1b02250db15b519b4bd5769971506e6bb Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Thu, 20 Feb 2025 11:00:14 +0800 Subject: [PATCH] [KYUUBI #6674] Bump Scalafmt to 3.9.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: 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 :bookmark: - [ ] 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 :coffin: #### Behavior With This Pull Request :tada: #### 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 d9f4f9ddc [Bowen Liang] 3.9.0 438a07d61 [Bowen Liang] reformat 2df50669c [liangbowen] bump scalafmt to 3.8 Lead-authored-by: Bowen Liang Co-authored-by: liangbowen Signed-off-by: Bowen Liang --- .scalafmt.conf | 4 ++-- .../test/scala/org/apache/kyuubi/util/AssertionUtils.scala | 5 ++--- pom.xml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index b0e130715..52a2bab27 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.7.5 +version = 3.9.0 runner.dialect=scala212 project.git=true @@ -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 diff --git a/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/AssertionUtils.scala b/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/AssertionUtils.scala index d5a0f513c..0f25ab7fa 100644 --- a/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/AssertionUtils.scala +++ b/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/AssertionUtils.scala @@ -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) { diff --git a/pom.xml b/pom.xml index 72bc32ba2..2bd3e4d93 100644 --- a/pom.xml +++ b/pom.xml @@ -266,7 +266,7 @@ 22.3.0 - 3.7.5 + 3.9.0 apache.releases.https Apache Release Distribution Repository