spotless
spotless copied to clipboard
[Feature] Support editorconfig
Support https://editorconfig.org
instead of this
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
ratchetFrom 'origin/main'
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
you could simply do
spotless {
editorConfig()
}
which would simply figure out all the same information, and also presumably pass it to other things like
spotless {
java {
}
would inherit it.
possibly code or coordination of a general library for editor config in java here.
https://github.com/ec4j/editorconfig-gradle-plugin
Partial dupe of #142, but each issue is unique enough to stand on its own.
I would like to see this. My use case is using the official Android XML format, and should be easy to just export the editorconfig from IntelliJ and that Spotless read it to know how to sort the xml fields for example.
That would be really convinient to have such thing in spotless. .editorconfig is widely spread amoung Java community, which uses Intellij Idea Basically, it's placed in the root of the project
I would be great if you add this support for Maven and Gradle :)
Need this for using .editorconfig for all file types (*.yml, *.sh, etc.)
This would really solve a lot of headaches for our team's overall formatting style as we rely on .editorconfig. Would be nice to see an update coming supporting this.
Need this feature to solve all the headache we've due to different formatting style used in .editorconfig and spotless. Please add support for this.
+1 for this feature!