diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-10-24 14:20:09 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-10-24 14:20:09 +0300 |
commit | d28de77017fc810cd253021470bc7de6f9a96f12 (patch) | |
tree | 76ac08b8a0999009cdf9c84e63662b6368464f3f /checkstyle.xml | |
parent | 6d564aa54cbbda7f3cbc8225f8561e8518009de2 (diff) | |
download | LibGui-d28de77017fc810cd253021470bc7de6f9a96f12.tar.gz LibGui-d28de77017fc810cd253021470bc7de6f9a96f12.tar.bz2 LibGui-d28de77017fc810cd253021470bc7de6f9a96f12.zip |
Add checkstyle to check code format
Diffstat (limited to 'checkstyle.xml')
-rw-r--r-- | checkstyle.xml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 0000000..ba8120f --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="localeLanguage" value="en"/> + <property name="tabWidth" value="4"/> + + <module name="NewlineAtEndOfFile"/> + <module name="JavadocPackage"/> + + <module name="SuppressionSingleFilter"> + <property name="checks" value="LeftCurly"/> + <property name="message" value="line.break.after"/> + </module> + + <module name="TreeWalker"> + <!-- Code format --> + <module name="AnnotationLocation"/> + <module name="LeftCurly"/> + <module name="RightCurly"/> + <module name="GenericWhitespace"/> + <module name="NeedBraces"> + <property name="allowSingleLineStatement" value="true"/> + </module> + <module name="RegexpSinglelineJava"> + <property name="format" value="^\t* {4,}"/> + <property name="message" value="Indent must use tab characters"/> + <property name="ignoreComments" value="true"/> + </module> + + <!-- Imports --> + <module name="AvoidStarImport"> + <property name="allowStaticMemberImports" value="true"/> + </module> + <module name="IllegalImport"> + <!-- Prevent internal, AWT/Swing and JFX classes --> + <property name="illegalPkgs" value="sun, java.awt, javax.swing, javafx"/> + </module> + <module name="ImportOrder"> + <property name="groups" value="/(com.mojang|net.fabricmc|net.minecraft)\..+/,*,/javax?\..+/"/> + <property name="separated" value="true"/> + <property name="useContainerOrderingForStatic" value="true"/> + </module> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + </module> +</module> |