Though I am using Spotless with Gradle, this is an Spotless question. As I’m not sure where else to ask I’m trying here.
Using the spotless gradle plugin to format my code. The configuration is using an Eclipse formatter configuration file
config/spotless/my-eclipse-formatter.xml
plugins {
id 'com.diffplug.gradle.spotless' version '3.26.0'
}
The code standard I have adopted from the Google Java Code Standard. Just a little bit modified, such as indentation 4 instead of 2.
The Java Code Standard uses lowerCamelCase for its variables. I cannot find how Spotless can detect snake_case variables. This is something I see very often from developers coming from other languages. I have checked with Eclipse, there is no settings for variables in Eclipse Preferences - Java - Code Style - Formatter.
Perhaps there is a configuration option with the Spotless Gradle Plugin?
The Gradle spotless configuration:
spotless {
enforceCheck true
java {
importOrderFile 'config/spotless/eclipse.importorder'
eclipse().configFile 'config/spotless/eclipse-format.xml'
trimTrailingWhitespace()
removeUnusedImports()
}
}
Does Spotless support checking case for either class, method and variables?