mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-22 18:16:14 +01:00
Add Checkstyle plugin and enforce header
This commit is contained in:
parent
af402447b6
commit
c3abd823ed
14
checkstyle/checkstyle.xml
Normal file
14
checkstyle/checkstyle.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE module PUBLIC
|
||||||
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||||
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
|
|
||||||
|
<module name="Checker">
|
||||||
|
<property name="fileExtensions" value="java, xml"/>
|
||||||
|
<property name="charset" value="UTF-8"/>
|
||||||
|
|
||||||
|
<module name="Header">
|
||||||
|
<property name="fileExtensions" value="java"/>
|
||||||
|
<property name="headerFile" value="${checkstyle.header.file}"/>
|
||||||
|
</module>
|
||||||
|
</module>
|
5
checkstyle/header.txt
Normal file
5
checkstyle/header.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) filoghost and contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
8
checkstyle/suppressions.xml
Normal file
8
checkstyle/suppressions.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE suppressions PUBLIC
|
||||||
|
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||||
|
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||||
|
|
||||||
|
<suppressions>
|
||||||
|
<suppress checks="Header" files=".*[\\/]me[\\/]filoghost[\\/]chestcommands[\\/]util[\\/]nbt[\\/].+\.java"/>
|
||||||
|
</suppressions>
|
29
pom.xml
29
pom.xml
@ -154,6 +154,12 @@
|
|||||||
<version>3.2.3</version>
|
<version>3.2.3</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
@ -169,6 +175,29 @@
|
|||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<configLocation>checkstyle/checkstyle.xml</configLocation>
|
||||||
|
<suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
|
||||||
|
<headerLocation>checkstyle/header.txt</headerLocation>
|
||||||
|
<sourceDirectories>
|
||||||
|
<sourceDirectory>${project.basedir}</sourceDirectory>
|
||||||
|
</sourceDirectories>
|
||||||
|
<includes>pom.xml, src/main/java/**/*.java</includes>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>checkstyle-check</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
Loading…
Reference in New Issue
Block a user