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
I am not entirely sure wether this is the intended behavior, so here is an issue. The the continuation of the long string doesn't indent with 8 spaces from the previous line which I would expect in AOSP.
❯ java -jar ~/Downloads/google-java-format-1.24.0-all-deps.jar Test.java
public class Test {
String s =
"asdfasdfasdfasdf"
+ " asdfasdfasdfasdfasdfasdffasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd";
}
❯ java -jar ~/Downloads/google-java-format-1.24.0-all-deps.jar --aosp Test.java
public class Test {
String s =
"asdfasdfasdfasdf"
+ " asdfasdfasdfasdfasdfasdffasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd";
}
I would expect the following output using AOSP style
Thanks for the report. The wrapping of long string literals is handled as a separate pass (--skip-reflowing-long-strings), and I think it's making non-AOSP assumptions instead of passing in the configuration.
I haven't double-checked if this is the exact culprit, but this comment looks suspicious:
I am not entirely sure wether this is the intended behavior, so here is an issue. The the continuation of the long string doesn't indent with 8 spaces from the previous line which I would expect in AOSP.
Test.java
I would expect the following output using AOSP style
I raised this issue in the spotless repo because I figured that spotless not indenting the same way as GJF would be a spotless bug.
If this is the intended behavior, please let me know, so that I can reraise the issue at spotless.
The text was updated successfully, but these errors were encountered: