Skip to content

HDDS-6689. New checkstyle: NoLineWrap#3378

Closed
kaijchen wants to merge 2 commits intoapache:masterfrom
kaijchen:HDDS-6689
Closed

HDDS-6689. New checkstyle: NoLineWrap#3378
kaijchen wants to merge 2 commits intoapache:masterfrom
kaijchen:HDDS-6689

Conversation

@kaijchen
Copy link
Member

@kaijchen kaijchen commented May 3, 2022

What changes were proposed in this pull request?

Add new checkstyle rule NoLineWrap, which checks no line wrap in pacakge, import and static import statements.

https://checkstyle.sourceforge.io/config_whitespace.html#NoLineWrap

Fix violations by running the following command multiple times.

grep -rlE '^import[^;]*$' --include '*.java' | xargs sed -szi 's/\(\nimport[^;\n]\+\)\n \+/\1/g'

P.S. Each iteration changes

import abc      import abc.def
    .def    =>      .ghi;
    .ghi;

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6689

How was this patch tested?

Existing CI.

@kaijchen kaijchen force-pushed the HDDS-6689 branch 2 times, most recently from 7df8b2b to 2487985 Compare May 22, 2022 14:39
@kaijchen kaijchen closed this May 25, 2022
@adoroszlai
Copy link
Contributor

Thanks @kaijchen for the patch. I think it's a nice improvement. However, there are a few feature branches out there, some planned to be merged soon. I would like to avoid causing conflicts or failures for them due to this change. So let's re-visit this once those branches are merged.

@kaijchen
Copy link
Member Author

Thanks @adoroszlai for the comments. Actually I'm closing this for the same reason.
This patch is very easy to make (by command), and we can wait for a good chance to reopen it.

@kaijchen kaijchen reopened this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants