I have a project that uses Spotless with the Eclipse formatter to check and format the source code.
Now one problem is that the formatter creates some absurdly long lines such as the following:
@ApiModelProperty(value = "This is a placeholder text but the real text is just as long as this.", required = true, example = "811769e0-69f8-11e6-91aa-02000ab20f88")
That’s 170 characters, and I got eye-strain and SonarQube complaining. When I break the line, Spotless/Eclipse insist on joining the lines together. The configuration file has lines such as:
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="150"/>
The file is picked up fine, but the formatter still joins these wrapped lines and would never split them. There seems to be a related ancient (and closed) issue 338916 in the Eclipse bug tracker. This is probably not a Spotless configuration issue, since it delegates everything to the Ecplipse plugin. Which magic configuration key will persuate the Eclipse formatter to behave as advertised?