Skip to content

Commit

Permalink
[#1769] Implement more Checkstyle checks (#2022)
Browse files Browse the repository at this point in the history
Currently, RepoSense does not have Checkstyle for 
- JavadocTagContinuationIndentation
- DefaultComesLast
- NoWhitespaceBeforeCaseDefaultColon.

Adding these checks can make it easier for future contributors 
to adhere to Reposense's coding style.

Let's add more Checkstyle checks to ensure easier standardisation
of code style.
  • Loading branch information
germainelee02 committed Jul 28, 2023
1 parent a9f102d commit 1d20634
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@
ORDER CHECKS
-->

<!-- Checks that the default is after all the cases in a switch statement. -->
<module name="DefaultComesLast"/>

<!-- Checks that the order of at-clauses follows the tagOrder default property value order.
@author, @version, @param, @return, @throws, @exception, @see, @since, @serial, @serialField, @serialData, @deprecated
-->
Expand Down Expand Up @@ -245,6 +248,9 @@
WHITESPACE CHECKS
-->

<!-- Checks that there is no whitespace before the colon in a switch block. -->
<module name="NoWhitespaceBeforeCaseDefaultColon"/>

<!-- Checks that comments are indented relative to their position in the code -->
<module name="CommentsIndentation"/>

Expand Down Expand Up @@ -358,6 +364,12 @@
<!-- Checks that all Javadoc comments start from the second line. -->
<module name="JavadocContentLocationCheck" />

<!-- Checks the indentation of the continuation lines in block tags. -->
<module name="JavadocTagContinuationIndentation">
<property name="offset" value="0"/>
<property name="violateExecutionOnNonTightHtml" value="true"/>
</module>

<!-- Checks the Javadoc's format for every method (excluding getters, setters and constructors). -->
<module name="JavadocMethod">
<property name="allowMissingParamTags" value="true"/>
Expand Down

0 comments on commit 1d20634

Please sign in to comment.