I am using the Spotless plugin to format my Java code. However, when I am enabling the reflowLongStrings rule, it breaks lines to be no longer than 80 chars. Is it possible to change it to 120?
Asked
Active
Viewed 860 times
1 Answers
1
Google java format is not configurable by design (have a look at this) so there is no way for configuring a custom max line width. What you can do is to configure spotless plugin to work with a custom eclipse jdt formatter. Here you can see how this is done in the spotless documentation.
For example, for gradle you would have:
spotless {
java {
eclipse().configFile('custom-config.xml')
}
}
Instead of:
spotless {
java {
googleJavaFormat()
}
}

frblazquez
- 115
- 1
- 10