ozone
ozone copied to clipboard
HDDS-6689. New checkstyle: NoLineWrap
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.
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.
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.