Skip to content

Commit

Permalink
Project: Update Checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedMohamedAbdelaty committed Oct 30, 2024
1 parent c2efea5 commit 892f342
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
checkstyle {
toolVersion = "10.8.0"
configFile = file("config/checkstyle/checkstyle.xml")
maxWarnings = 30
maxWarnings = 0
}

tasks.withType(Checkstyle).configureEach {
Expand Down
33 changes: 16 additions & 17 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@
<property name="eachLine" value="true"/>
</module>

<module name="LineLength">
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>

<module name="TreeWalker">
<!-- Checks for Naming Conventions -->
<module name="PackageName"/>
<module name="TypeName"/>
<module name="MethodName"/>
<module name="ConstantName"/>

<!-- Checks for imports -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>

<!-- Checks for Size Violations -->
<module name="MethodLength">
<property name="max" value="100"/>
<!-- Checks for Indentation -->
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="4"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="8"/>
<property name="arrayInitIndent" value="4"/>
</module>

<!-- Checks for whitespace -->
Expand All @@ -37,9 +35,11 @@
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>

<!-- Modifier Checks -->
<module name="ModifierOrder"/>
Expand All @@ -52,8 +52,7 @@

<!-- Checks for common coding problems -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>

<!-- Miscellaneous other checks -->
<module name="ArrayTypeStyle"/>
Expand Down

0 comments on commit 892f342

Please sign in to comment.