Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORC-1665: Migrate to importOrder of spotless-maven-plugin #1860

Closed
wants to merge 1 commit into from

Conversation

cxzl25
Copy link
Contributor

@cxzl25 cxzl25 commented Mar 26, 2024

What changes were proposed in this pull request?

This PR aims to enable the importOrder function in spotless-maven-plugin.

mvn spotless:apply -Panalyze

Why are the changes needed?

Although there is now checkstyle to limit the order of imports, it cannot be automatically adjusted. spotless-maven-plugin can check and automatically adjust.

#1859 (review)

How was this patch tested?

local test

Was this patch authored or co-authored using generative AI tooling?

No

@cxzl25 cxzl25 changed the title [ORC-1665] Enable the importOrder function in spotless-maven-plugin ORC-1665: Enable the importOrder function in spotless-maven-plugin Mar 26, 2024
@@ -330,4 +330,3 @@ private byte[] getMaterial() {
}

}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because these files have two newlines at the end, one newline is automatically deleted after spotless apply.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because these files have two newlines at the end, one newline is automatically deleted after spotless apply.

Please make a new PR for the end line change separately before all of these migration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we need a way to prevent any future regression in terms of the end line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make a new PR for the end line change separately before all of these migration.

OK

we need a way to prevent any future regression in terms of the end line

Now spotless-maven-plugin will check this behavior, so the beginning of the CI failed at the beginning.

https://github.com/apache/orc/actions/runs/8437582330/job/23107719304#step:5:8408

@dongjoon-hyun dongjoon-hyun changed the title ORC-1665: Enable the importOrder function in spotless-maven-plugin ORC-1665: Migrate to importOrder of spotless-maven-plugin Mar 26, 2024
@dongjoon-hyun dongjoon-hyun added this to the 2.1.0 milestone Mar 26, 2024
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Mar 26, 2024
### What changes were proposed in this pull request?
This PR aims to remove extra newlines at the end of Java files.

### Why are the changes needed?
#1860 (comment)

### How was this patch tested?
GA

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #1861 from cxzl25/ORC-1666.

Authored-by: sychen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Could you resolve the conflicts, @cxzl25 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants