From c3abd823ed21e68a4175449979b994fca3d2b8fd Mon Sep 17 00:00:00 2001 From: filoghost Date: Sat, 22 Aug 2020 19:07:26 +0200 Subject: [PATCH] Add Checkstyle plugin and enforce header --- checkstyle/checkstyle.xml | 14 ++++++++++++++ checkstyle/header.txt | 5 +++++ checkstyle/suppressions.xml | 8 ++++++++ pom.xml | 29 +++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 checkstyle/checkstyle.xml create mode 100644 checkstyle/header.txt create mode 100644 checkstyle/suppressions.xml diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml new file mode 100644 index 0000000..d8b5aa7 --- /dev/null +++ b/checkstyle/checkstyle.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/checkstyle/header.txt b/checkstyle/header.txt new file mode 100644 index 0000000..4a72f4d --- /dev/null +++ b/checkstyle/header.txt @@ -0,0 +1,5 @@ +/* + * Copyright (C) filoghost and contributors + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ \ No newline at end of file diff --git a/checkstyle/suppressions.xml b/checkstyle/suppressions.xml new file mode 100644 index 0000000..c578f08 --- /dev/null +++ b/checkstyle/suppressions.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 33680cb..e067fec 100644 --- a/pom.xml +++ b/pom.xml @@ -154,6 +154,12 @@ 3.2.3 + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.1 + + org.apache.maven.plugins maven-enforcer-plugin @@ -169,6 +175,29 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + + checkstyle/checkstyle.xml + checkstyle/suppressions.xml + checkstyle/header.txt + + ${project.basedir} + + pom.xml, src/main/java/**/*.java + + + + checkstyle-check + validate + + check + + + + + org.apache.maven.plugins maven-enforcer-plugin