How can I instruct the Spotless code formatter to ignore a specific code section?
I wrote this Java code section:
String content = Joiner.on(System.lineSeparator()).join(
"services:",
"- name: name",
" image: artifacts-dev/image"
);
Spotless formats it to this:
String content =
Joiner.on(System.lineSeparator())
.join("services:", "- name: name", " image: artifacts-dev/image");
I want to instruct Spotless to ignore (skip formatting) the above code segment.
How do I do that?
For comparison, the Prettier formatter can be instructed to ignore code segments by adding a comment:
// prettier-ignore
Is there a similar feature for Spotless?