You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behaviour is observed when using spotless-plugin-gradle:6.25.0. It is also observed for the develop branch (as of 17 October 2024) in this repo, when trying it as input in a unit test (FormatterTest). It occurs for style 'palantir':
This input
classClassBextendsClassA {
@TestvoidshouldDoThisAndThat() {
instance.shouldDoSomething(Set.of(
"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijk", // prio (yet to go live)"abcdefghijkabcdefghijkabcdefghijkabjkghijkabcdefghij", // prio low, not exposed yet only for manual use"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkghijkabcdefghij"// prio low, not exposed yet only for manual use
));
}
}
results in the following formatted output. The second and third line of the comment are not indented correctly:
classClassBextendsClassA {
@TestvoidshouldDoThisAndThat() {
instance.shouldDoSomething(Set.of(
"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijk", // prio// (yet to// go live)"abcdefghijkabcdefghijkabcdefghijkabjkghijkabcdefghij", // prio low, not exposed yet only// for manual use"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkghijkabcdefghij"// prio low, not exposed yet only for manual use
));
}
}
What did you want to happen?
After the line wrap, the comment should start in the same column as the comment in the first line.
This is how the indentation should look like:
classClassBextendsClassA {
@TestvoidshouldDoThisAndThat() {
instance.shouldDoSomething(Set.of(
"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijk", // prio// (yet to// go live)"abcdefghijkabcdefghijkabcdefghijkabjkghijkabcdefghij"// prio low, not exposed yet only for// manual use
));
...
}
}
Interestingly, it works correctly if I remove the last long line:
"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkghijkabcdefghij"// prio low, not exposed yet only for manual use:
The text was updated successfully, but these errors were encountered:
What happened?
This behaviour is observed when using spotless-plugin-gradle:6.25.0. It is also observed for the develop branch (as of 17 October 2024) in this repo, when trying it as input in a unit test (FormatterTest). It occurs for style 'palantir':
This input
results in the following formatted output. The second and third line of the comment are not indented correctly:
What did you want to happen?
After the line wrap, the comment should start in the same column as the comment in the first line.
This is how the indentation should look like:
Interestingly, it works correctly if I remove the last long line:
The text was updated successfully, but these errors were encountered: