$root/config
- checkstyle.xml
- suppression.ml
plugins {
id 'checkstyle'
}
// config
checkstyle {
toolVersion = "6.5"
maxErrors = 0
maxWarnings = 0
}
$root/config
plugins {
id 'checkstyle'
}
// config
checkstyle {
toolVersion = "6.5"
maxErrors = 0
maxWarnings = 0
}
$root/config/spotless
4=
3=com
2=org
1=javax
0=java
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="XyzStandard" version="1">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
.....
</profile>
</profiles>
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
java {
target project.fileTree(project.rootDir) {
include 'src/**/*.java'
exclude generatedSourcePath + '/**'
}
importOrderFile 'config/spotless/importorder'
eclipseFormatFile 'config/spotless/eclipse-formatting.xml'
}
}
test.shouldRunAfter 'spotlessCheck'