Skip to content

Commit

Permalink
Update checkstyle workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Dec 2, 2021
1 parent 5061ce2 commit 2bcfda0
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Checkstyle
on: pull_request

jobs:
Expand All @@ -13,3 +14,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-review'
tool_name: 'checkstyle'
checkstyle_config: '../../code-style/checkstyle.xml'
106 changes: 106 additions & 0 deletions code-style/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
<property name="severity" value="warning" />
<module name="TreeWalker">
<module name="JavadocMethod">
<property name="allowMissingPropertyJavadoc" value="true" />
</module>
<module name="JavadocType" />
<module name="JavadocVariable" />
<module name="JavadocStyle" />
<module name="ConstantName" />
<module name="LocalFinalVariableName" />
<module name="LocalVariableName" />
<module name="MemberName" />
<module name="MethodName" />
<module name="PackageName" />
<module name="ParameterName" />
<module name="StaticVariableName" />
<module name="TypeName" />
<module name="AvoidStarImport" />
<module name="IllegalImport" />
<module name="RedundantImport" />
<module name="UnusedImports">
<property name="processJavadoc" value="true" />
</module>
<module name="FallThrough" />
<module name="MethodLength" />
<module name="ParameterNumber" />
<module name="EmptyForIteratorPad" />
<module name="MethodParamPad" />
<module name="NoWhitespaceAfter" />
<module name="NoWhitespaceBefore" />
<module name="OperatorWrap" />
<module name="ParenPad" />
<module name="TypecastParenPad" />
<module name="WhitespaceAfter" />
<module name="ModifierOrder" />
<module name="RedundantModifier" />
<module name="AvoidNestedBlocks" />
<module name="EmptyBlock" />
<module name="LeftCurly" />
<module name="NeedBraces" />
<module name="RightCurly" />
<!--<module name="AvoidInlineConditionals" />-->
<!--<module name="DoubleCheckedLocking" />-->
<module name="EmptyStatement" />
<module name="EqualsHashCode" />
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true" />
<property name="ignoreSetter" value="true" />
</module>
<module name="IllegalInstantiation" />
<module name="InnerAssignment" />
<module name="MagicNumber" />
<module name="MissingSwitchDefault" />
<!--<module name="RedundantThrows" />-->
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" />
<module name="FinalClass" />
<module name="HideUtilityClassConstructor" />
<module name="InterfaceIsType" />
<module name="VisibilityModifier" />
<module name="ArrayTypeStyle" />
<module name="FinalParameters" />
<module name="TodoComment" />
<module name="UpperEll" />
<module name="ImportOrder">
<property name="groups" value="java, javax, at, com, eu, org" />
<property name="separated" value="true" />
</module>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND, WILDCARD_TYPE" />
</module>
<module name="ModifiedControlVariable" />
<module name="MultipleStringLiterals" />
<!-- <module name="RequireThis"/> -->
<module name="PackageDeclaration" />
<module name="FinalLocalVariable">
<property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF" />
</module>
<module name="UnnecessaryParentheses" />
<module name="MissingOverride" />
<module name="MemberName" />
<module name="LineLength">
<property name="max" value="120" />
</module>
<module name="Indentation">
<property name="basicOffset" value="2" />
<property name="braceAdjustment" value="0" />
<property name="caseIndent" value="2" />
<property name="throwsIndent" value="2" />
<property name="arrayInitIndent" value="2" />
<property name="lineWrappingIndentation" value="2" />
<property name="forceStrictCondition" value="false" />
</module>
<module name="SuppressWarningsHolder" />
</module>
<module name="FileLength" />
<module name="FileTabCharacter" />
<module name="NewlineAtEndOfFile" />
<module name="Translation" />
<module name="SuppressWarningsFilter" />
</module>

0 comments on commit 2bcfda0

Please sign in to comment.