Skip to content

Commit

Permalink
checkstyle: adjust rules HiddenField, LineLength, InnerTypeLast, Rege…
Browse files Browse the repository at this point in the history
…xpSingleLine (#17)

* remove regex rules for "Created with/by"
* reduce max line length to 150
* lower severity of HiddenField to INFO
* lower severity of InnerTypeLast to INFO
  • Loading branch information
skaldarnar authored Jun 13, 2021
1 parent 5e48906 commit 66a660a
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- ************************** -->
<module name="LineLength">
<property name="severity" value="warning"/>
<property name="max" value="175"/>
<property name="max" value="150"/>
</module>

<module name="SuppressionFilter">
Expand Down Expand Up @@ -44,21 +44,11 @@
</module>

<!-- Disallow author names and auto-generated tags -->
<!-- TODO: replace with proper JavaDoc checks as soon as they work properly. See checkstyle#952 -->
<module name="RegexpSingleline">
<property name="severity" value="warning"/>
<property name="format" value="Created with"/>
<property name="ignoreCase" value="true"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Auto-generated message 'Created With' is not allowed"/>
</module>
<module name="RegexpSingleline">
<property name="severity" value="warning"/>
<property name="format" value="Created by"/>
<property name="ignoreCase" value="true"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Auto-generated message 'Created By' is not allowed"/>
</module>
<!--
TODO: replace with proper JavaDoc checks as soon as they work properly.
See https://github.com/checkstyle/checkstyle/issues/952
See https://github.com/checkstyle/checkstyle/issues/2506
-->
<module name="RegexpSingleline">
<property name="severity" value="warning"/>
<property name="format" value="^\s*\*\s*@author"/>
Expand Down Expand Up @@ -234,8 +224,10 @@
<module name="EqualsHashCode"/>
<!-- Checks that a local variable or a parameter does not shadow a field that is defined in the same class. -->
<module name="HiddenField">
<property name="severity" value="info"/>
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
<property name="setterCanReturnItsClass" value="true"/>
</module>
<!-- Checks for assignments in subexpressions. -->
<module name="InnerAssignment"/>
Expand Down Expand Up @@ -305,7 +297,7 @@
<module name="MutableException"/>
<!-- Check nested (internal) classes/interfaces are declared at the bottom of the class after all method and field declarations. -->
<module name="InnerTypeLast">
<property name="severity" value="warning"/>
<property name="severity" value="info"/>
</module>

<!-- Miscellaneous other checks -->
Expand Down

0 comments on commit 66a660a

Please sign in to comment.