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
Hello! I'm facing this issue:
I have many IDL and Xtend files that I would like to include to the spotless auto formatter task.
I'm planning to define a custom XML file, similar to the Eclipse ones, in order to give formatting rules.
For now the only thing that I can do is this:
format 'IDL', {
target '**/*.idl'
trimTrailingWhitespace()
endWithNewline()
}
I'm looking forward to do this:
format 'IDL', {
target '**/*.idl'
eclipse().configFile 'spotless.eclipseformat.xml'
trimTrailingWhitespace()
endWithNewline()
}
Right now this will throw the following error:
Could not find method eclipse() for arguments [] on object of type com.diffplug.gradle.spotless.FormatExtension.
Any ideas or suggestions for formatting non Java files with a custom XML file?
The text was updated successfully, but these errors were encountered:
But I'd be very surprised if the standard eclipse code formatter from JDT can also format xtend and IDL.
I think you'll probably need to create a new FormatterStep. You can do so in a separate project or in your buildscript, and we'd love a PR which includes your new features:
Thanks for suggestion! I was thinking to create my own XML file for formatting IDL/Xtend (I saw that I can define it with Checkstyle and then converting it to Eclipse)
I'll keep you updated:)
nedtwigg
changed the title
How to use an Eclipse XML for non standard file extensions?
Formatter for IDL and Xtend
Jun 20, 2017
Hello! I'm facing this issue:
I have many IDL and Xtend files that I would like to include to the spotless auto formatter task.
I'm planning to define a custom XML file, similar to the Eclipse ones, in order to give formatting rules.
For now the only thing that I can do is this:
I'm looking forward to do this:
Right now this will throw the following error:
Any ideas or suggestions for formatting non Java files with a custom XML file?
The text was updated successfully, but these errors were encountered: