ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-6689. New checkstyle: NoLineWrap

Open kaijchen opened this issue 3 years ago • 2 comments

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 avatar May 03 '22 05:05 kaijchen

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.

adoroszlai avatar May 25 '22 14:05 adoroszlai

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 avatar May 25 '22 14:05 kaijchen