Commit Graph

7 Commits

Author SHA1 Message Date
Bowen Liang
0f4906d1b0 [KYUUBI #6674] Bump Scalafmt to 3.9.x
# 🔍 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

d9f4f9ddc [Bowen Liang] 3.9.0
438a07d61 [Bowen Liang] reformat
2df50669c [liangbowen] bump scalafmt to 3.8

Lead-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Bowen Liang <liangbowen@gf.com.cn>
2025-02-20 11:00:14 +08:00
liangbowen
d9e1b60257 [KYUUBI #5007] Bump Scalafmt from 3.7.4 to 3.7.5
### _Why are the changes needed?_

- Scalafmt 3.7.5 release note: https://github.com/scalameta/scalafmt/releases/tag/v3.7.5

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

Closes #5007 from bowenliang123/scalafmt-3.7.5.

Closes #5007

f3f7163a4 [liangbowen] Bump Scalafmt from 3.7.4 to 3.7.5

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-06-30 11:34:36 +08:00
liangbowen
855cb0b7a4 [KYUUBI #4908] Bump Scalafmt from 3.7.3 to 3.7.4
### _Why are the changes needed?_

- Scalafmt 3.7.4 release note: https://github.com/scalameta/scalafmt/releases/tag/v3.7.4

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4908 from bowenliang123/scalafmt-3.7.4.

Closes #4908

466686a97 [liangbowen] Bump scalafmt to 3.7.4

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-05-31 17:58:14 +08:00
huapan
b0afe7b5d6
[KYUUBI #4696] Upgrade scalafmt from 3.7.1 to 3.7.3
### _Why are the changes needed?_

Close #4696

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4705 from huapan123456/feat-upgrade-scalafmt.

Closes #4696

434f94ddb [huapan] update(#4696): add some comment
7f8d7bd50 [huapan] fix(#4696): fix all
41dba1e6f [huapan] feat(#4696): upgrade scalafmt from 3.7.1 to 3.7.3

Authored-by: huapan <huapan@52tt.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-14 11:58:19 +08:00
liangbowen
8e91601909 [KYUUBI #4206] Bump scalafmt from 3.6.1 to 3.7.1
### _Why are the changes needed?_

- Bump scalafmt from 3.6.1 to 3.7.1, release notes: https://github.com/scalameta/scalafmt/releases/tag/v3.7.1
- Changes to existing code seem coming from the dependency bump of scalameta 4.7.x in scalafmt 3.7.0+ (https://github.com/scalameta/scalafmt/releases/tag/v3.7.0) used for parsing scala code and looking up the nested constructor usages.
- Notice: `spotless-maven-plugin` is now pinned on 2.30.0 as from 2.31.0 requiring Java 11+, and 2.31.0 is using `scalafmt` 3.7.1 by default, see (https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md#2310---2023-01-26)

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4206 from bowenliang123/scalafmt-3.7.1.

Closes #4206

fd7f498e [liangbowen] bump scalafmt from 3.6.1 to 3.7.1

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-01-29 14:57:29 +08:00
liangbowen
a482c49825
[KYUUBI #3840] [Improvement] Bump scalafmt to 3.6.1 and spotless maven plugin to 2.72.2
### _Why are the changes needed?_

to close #3840.

- bump scalafmt from 3.1.1 to 3.6.1
- bump spotless maven plugin from 2.41.1 to 2.72.2
- add `scalaMajorVersion` setting to spotless plugin configs

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3841 from bowenliang123/bump-scalafmt.

Closes #3840

1714012f [liangbowen] affect exist code with executing dev/reformat
9bafbb48 [liangbowen] change to scalaMajorVersion config name
56bf677d [liangbowen] bump scala fmt version to 3.6.1 and spotless maven plugin to 2.27.2

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-23 15:23:56 +08:00
zhouyifan279
ffe41631ce
[KYUUBI #1383] Leverage Scalafmt to auto format scala code
### _Why are the changes needed?_
#1383

As IntelliJ IDEA's `Optimize Imports` result does not meet rules in `scalastyle-config.xml`,  currently developers have to arrange package imports manually.

In this PR, we introduce a `.scalafmt.conf` file to solve the problem.
It works as follows:
1. Set scala code style formatter to `scalafmt`.
2. Execute `Reformat Code`
3. IDEA picks up configurations in  `.scalafmt.conf` and format both code lines and imports.

We also formatted all historical scala codes.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1391 from zhouyifan279/1383.

Closes #1383

e0696a9e [zhouyifan279] [KYUUBI #1383] Leverage Scalafmt to auto format scala code
18b8e229 [zhouyifan279] [KYUUBI #1383] Leverage Scalafmt to auto format scala code

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-11-22 17:51:23 +08:00