Skip to content

Commit ba77898

Browse files
ci(checkstyle-rules-modification): configure linter for the project [ci skip](#26)
The line length of characters rule was set to 80 characters but now I changed it to 100 characters. Update the rules of Java linter. Added configuration of checking the first sentence. Add the hidden field check and final parameter enforcement closes #25
1 parent 333c612 commit ba77898

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/linters/checkstyle.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<!-- See https://checkstyle.org/config_sizes.html -->
7272
<module name="FileLength"/>
7373
<module name="LineLength">
74+
<property name="max" value="100"/>
7475
<property name="fileExtensions" value="java"/>
7576
</module>
7677

@@ -104,7 +105,9 @@
104105
<module name="JavadocMethod"/>
105106
<module name="JavadocType"/>
106107
<module name="JavadocVariable"/>
107-
<module name="JavadocStyle"/>
108+
<module name="JavadocStyle">
109+
<property name="checkFirstSentence" value="false"/>
110+
</module>
108111
<module name="MissingJavadocMethod"/>
109112
<!-- Enables @SuppressWarnings Support -->
110113
<module name="SuppressWarningsHolder"/>
@@ -166,7 +169,9 @@
166169
<!-- See https://checkstyle.org/config_coding.html -->
167170
<module name="EmptyStatement"/>
168171
<module name="EqualsHashCode"/>
169-
<module name="HiddenField"/>
172+
<module name="HiddenField">
173+
<property name="tokens" value="VARIABLE_DEF"/>
174+
</module>
170175
<module name="IllegalInstantiation"/>
171176
<module name="InnerAssignment"/>
172177
<module name="MagicNumber"/>
@@ -187,6 +192,8 @@
187192
<!-- See https://checkstyle.org/config_misc.html -->
188193
<module name="ArrayTypeStyle"/>
189194
<module name="FinalParameters"/>
195+
<property name="tokens" value="CTOR_DEF"/>
196+
<property name="ignorePrimitiveTypes" value="true"/>
190197
<module name="TodoComment"/>
191198
<module name="UpperEll"/>
192199

0 commit comments

Comments
 (0)