-
Notifications
You must be signed in to change notification settings - Fork 484
Description
The groovy eclipse formatter is very inconsistent with regard to formatting groovy and gradle files. This isn't spotless's problem, as similar behavior is apparent in Eclipse with the Groovy plugins installed. However, I thought this would be a good place to ask if anyone had discovered any alternatives.
As an example, this line:
ext {
aSet = ['abcd','sdfsdfb','sdfsdfdsc','sdsdfdsdfdsfd'] as Set<String>
}
spotlessCheck will not fail because of that block, yet spotlessApply will change it to:
ext {
aSet = [
'abcd',
'sdfsdfb',
'sdfsdfdsc',
'sdsdfdsdfdsfd'] as Set<String>
}
I can create odd variances of the above, by moving the trailing brace of the block up. The formatter seems to really only trigger a failure consistently if the gradle files is very poorly formatted.
I have a sample project here that illustrates the problems with the groovy eclipse formatter: https://github.com/scottresnik/spotless-wildcard
Anyone have any good alternatives that work well with spotless?