From 5afc7951e20c37f39ad76e45f8bcca3925425b15 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Wed, 13 Apr 2022 16:48:46 +0200 Subject: [PATCH] chore: add Java linter (#14) * chore: Add Checkstyle configuration by Google (as 2019) * chore: Setup dir structure as expected by Checkstyle plugin * chore: Add checkstyle plugin to gradle * chore: set path to configuration for gralde plugin * fix: remove missing checkstyle options --- build.gradle | 5 + config/checkstyle/checkstyle.xml | 361 +++++++++++++++++++++++++++++++ 2 files changed, 366 insertions(+) create mode 100644 config/checkstyle/checkstyle.xml diff --git a/build.gradle b/build.gradle index 94236a0a..3c2909a4 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'application' id 'org.openjfx.javafxplugin' version '0.0.10' id 'org.beryx.jlink' version '2.24.1' + id 'checkstyle' } group 'io.rpg' @@ -19,6 +20,10 @@ ext { sourceCompatibility = '17' targetCompatibility = '17' +checkstyle { + configFile = file('config/checkstyle/checkstyle.xml') +} + tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 00000000..f160a312 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +