<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="Translation">
<property name="requiredTranslations" value="de, fr, en"/>
</module>
<module name="UniqueProperties"/>
<!--<module name="FileTabCharacter"/>-->
</module>
checkstyle {
toolVersion = "6.17"
sourceSets = [sourceSets.main]
ignoreFailures = true //todo
showViolations = true
reportsDir = file("$project.buildDir/checkstyleReports")
configFile = file("$rootDir/gradle/checkstyle2.xml")
configProperties = ['baseDir': "$project.projectDir"]
}
#messages.propertieshello=Hellocancel=Cancel
#messages_de.propertieshell=Hallook=OK
hell=Hallo2
gradle clean checkstyleMain
java -jar ../checkstyle-6.17-all.jar -c ../gradle/checkstyle2.xml src/main
Starting audit...
*****
[ERROR] ****\src\main\resources\messages_de.properties:2: Duplicated property 'hell' (2 occurrence(s)). [UniqueProperties][ERROR] ****\src\main\resources:0: Properties file 'messages_en.properties' is missing. [Translation][ERROR] ****\src\main\resources:0: Properties file 'messages_fr.properties' is missing. [Translation][ERROR] src\main\resources\messages_de.properties:0: Key 'cancel' missing. [Translation][ERROR] src\main\resources\messages_de.properties:0: Key 'hello' missing. [Translation][ERROR] src\main\resources\messages.properties:0: Key 'hell' missing. [Translation][ERROR] src\main\resources\messages.properties:0: Key 'ok' missing. [Translation]Audit done.Checkstyle ends with 9 errors.
sourceSets = [sourceSets.main]
checkstyleMain {
source sourceSets.main.allSource
}