Skip to content

Commit a5ad992

Browse files
committed
feat: initial commit
0 parents  commit a5ad992

34 files changed

+2538
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE suppressions PUBLIC
3+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
4+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
5+
<suppressions>
6+
<suppress checks="(?:Javadoc.*)" files=".*[\\/]test[\\/].*"/>
7+
<suppress checks=".*" files=".*[\\/]generated[\\/].*"/>
8+
</suppressions>

.checkstyle/checkstyle.xml

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
~
4+
~ MIT License
5+
~
6+
~ Copyright (c) 2024 Incendo
7+
~
8+
~ Permission is hereby granted, free of charge, to any person obtaining a copy
9+
~ of this software and associated documentation files (the "Software"), to deal
10+
~ in the Software without restriction, including without limitation the rights
11+
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
~ copies of the Software, and to permit persons to whom the Software is
13+
~ furnished to do so, subject to the following conditions:
14+
~
15+
~ The above copyright notice and this permission notice shall be included in all
16+
~ copies or substantial portions of the Software.
17+
~
18+
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
~ SOFTWARE.
25+
~
26+
-->
27+
28+
<!DOCTYPE module PUBLIC
29+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
30+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
31+
32+
<!--
33+
34+
Checkstyle configuration that checks the sun coding conventions from:
35+
36+
- the Java Language Specification at
37+
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
38+
39+
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
40+
41+
- the Javadoc guidelines at
42+
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
43+
44+
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
45+
46+
- some best practices
47+
48+
Checkstyle is very configurable. Be sure to read the documentation at
49+
https://checkstyle.org (or in your downloaded distribution).
50+
51+
Most Checks are configurable, be sure to consult the documentation.
52+
53+
To completely disable a check, just comment it out or delete it from the file.
54+
To suppress certain violations please review suppression filters.
55+
56+
Finally, it is worth reading the documentation.
57+
58+
-->
59+
60+
<module name="Checker">
61+
62+
<!--
63+
If you set the basedir property below, then all reported file
64+
names will be relative to the specified directory. See
65+
https://checkstyle.org/config.html#Checker
66+
67+
<property name="basedir" value="${basedir}"/>
68+
-->
69+
<property name="severity" value="error"/>
70+
71+
<property name="fileExtensions" value="java, properties"/>
72+
73+
<!-- Excludes all 'module-info.java' files -->
74+
<!-- See https://checkstyle.org/config_filefilters.html -->
75+
<module name="BeforeExecutionExclusionFileFilter">
76+
<property name="fileNamePattern" value="module\-info\.java$"/>
77+
</module>
78+
79+
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
80+
<module name="SuppressionFilter">
81+
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
82+
<property name="optional" value="false"/>
83+
</module>
84+
85+
<!-- Checks that a package-info.java file exists for each package. -->
86+
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
87+
<module name="JavadocPackage"/>
88+
89+
<!-- Checks whether files end with a new line. -->
90+
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
91+
<module name="NewlineAtEndOfFile"/>
92+
93+
<!-- Checks that property files contain the same keys. -->
94+
<!-- See https://checkstyle.org/config_misc.html#Translation -->
95+
<module name="Translation"/>
96+
97+
<!-- Checks for Size Violations. -->
98+
<!-- See https://checkstyle.org/config_sizes.html -->
99+
<module name="FileLength"/>
100+
<module name="LineLength">
101+
<property name="fileExtensions" value="java"/>
102+
<property name="max" value="140"/>
103+
<property name="ignorePattern" value="^ *\* "/> <!-- Ignore long JavaDoc lines (i.e. a link) -->
104+
</module>
105+
106+
<!-- Checks for whitespace -->
107+
<!-- See https://checkstyle.org/config_whitespace.html -->
108+
<module name="FileTabCharacter"/>
109+
110+
<!-- Miscellaneous other checks. -->
111+
<!-- See https://checkstyle.org/config_misc.html -->
112+
<module name="RegexpSingleline">
113+
<property name="format" value="\s+$"/>
114+
<property name="minimum" value="0"/>
115+
<property name="maximum" value="0"/>
116+
<property name="message" value="Line has trailing spaces."/>
117+
</module>
118+
119+
<!-- Checks for Headers -->
120+
<!-- See https://checkstyle.org/config_header.html -->
121+
<!-- <module name="Header"> -->
122+
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
123+
<!-- <property name="fileExtensions" value="java"/> -->
124+
<!-- </module> -->
125+
126+
<module name="TreeWalker">
127+
128+
<!-- Checks for Javadoc comments. -->
129+
<!-- See https://checkstyle.org/config_javadoc.html -->
130+
<module name="InvalidJavadocPosition"/>
131+
<module name="JavadocMethod"/>
132+
<module name="JavadocType"/>
133+
<module name="JavadocStyle">
134+
<property name="checkFirstSentence" value="false"/>
135+
</module>
136+
<module name="MissingJavadocMethod"/>
137+
138+
<!-- Checks for Naming Conventions. -->
139+
<!-- See https://checkstyle.org/config_naming.html -->
140+
<module name="ConstantName"/>
141+
<module name="LocalFinalVariableName"/>
142+
<module name="LocalVariableName"/>
143+
<module name="MemberName"/>
144+
<module name="MethodName"/>
145+
<module name="PackageName"/>
146+
<module name="ParameterName"/>
147+
<module name="StaticVariableName"/>
148+
<module name="TypeName"/>
149+
150+
<!-- Checks for imports -->
151+
<!-- See https://checkstyle.org/config_imports.html -->
152+
<module name="AvoidStarImport"/>
153+
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
154+
<module name="RedundantImport"/>
155+
<module name="UnusedImports">
156+
<property name="processJavadoc" value="true"/>
157+
</module>
158+
159+
<!-- https://checkstyle.org/config_imports.html#CustomImportOrder -->
160+
<module name="CustomImportOrder">
161+
<property name="customImportOrderRules" value="THIRD_PARTY_PACKAGE###STATIC"/>
162+
<property name="standardPackageRegExp" value="^$"/>
163+
<property name="sortImportsInGroupAlphabetically" value="true"/>
164+
</module>
165+
166+
<!-- Checks for whitespace -->
167+
<!-- See https://checkstyle.org/config_whitespace.html -->
168+
<module name="EmptyForIteratorPad"/>
169+
<module name="GenericWhitespace"/>
170+
<module name="MethodParamPad"/>
171+
<module name="NoWhitespaceAfter"/>
172+
<module name="NoWhitespaceBefore"/>
173+
<module name="OperatorWrap"/>
174+
<module name="ParenPad"/>
175+
<module name="TypecastParenPad"/>
176+
<module name="WhitespaceAfter"/>
177+
178+
<!-- Modifier Checks -->
179+
<!-- See https://checkstyle.org/config_modifiers.html -->
180+
<module name="ModifierOrder"/>
181+
<module name="RedundantModifier"/>
182+
183+
<!-- Checks for blocks. You know, those {}'s -->
184+
<!-- See https://checkstyle.org/config_blocks.html -->
185+
<module name="AvoidNestedBlocks"/>
186+
<module name="EmptyBlock"/>
187+
<module name="LeftCurly"/>
188+
<module name="NeedBraces"/>
189+
<module name="RightCurly"/>
190+
191+
<!-- Checks for common coding problems -->
192+
<!-- See https://checkstyle.org/config_coding.html -->
193+
<module name="EmptyStatement"/>
194+
<module name="EqualsHashCode"/>
195+
<module name="IllegalInstantiation"/>
196+
<module name="InnerAssignment"/>
197+
<module name="MissingSwitchDefault"/>
198+
<module name="MultipleVariableDeclarations"/>
199+
<module name="SimplifyBooleanExpression"/>
200+
<module name="SimplifyBooleanReturn"/>
201+
202+
<!-- Checks for class design -->
203+
<!-- See https://checkstyle.org/config_design.html -->
204+
<module name="FinalClass"/>
205+
<module name="InterfaceIsType"/>
206+
<module name="VisibilityModifier"/>
207+
208+
<!-- Miscellaneous other checks. -->
209+
<!-- See https://checkstyle.org/config_misc.html -->
210+
<module name="ArrayTypeStyle"/>
211+
<module name="FinalParameters"/>
212+
<module name="TodoComment"/>
213+
<module name="UpperEll"/>
214+
215+
<module name="RequireThis">
216+
<property name="validateOnlyOverlapping" value="false"/>
217+
</module>
218+
219+
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
220+
<module name="SuppressionXpathFilter">
221+
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
222+
default="checkstyle-xpath-suppressions.xml"/>
223+
<property name="optional" value="true"/>
224+
</module>
225+
226+
</module>
227+
228+
</module>

0 commit comments

Comments
 (0)