Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Mar 29, 2024
2 parents 568279a + 12e8a77 commit fb289fb
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="TrailingLineSpace"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<!--
Windows line endings are not allowed.
-->
<module name="RegexpMultiline">
<property name="format" value="\r\n$"/>
<property name="id" value="UnixEndOfLine"/>
<property name="message" value="Lines in file should end with Unix-like end of line"/>
</module>
<!--
Expand All @@ -95,6 +97,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<module name="RegexpMultiline">
<property name="format" value="\r?\n[ \t\x0B\f]*\r?\n[ \t\x0B\f]*\r?\n"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="TwoConsecutiveEmptyLines"/>
<property name="message" value="Two consecutive empty lines"/>
</module>
<!--
Expand All @@ -103,51 +106,61 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<module name="RegexpSingleline">
<property name="format" value="\* +@return +[^A-Z]"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="ReturnShouldStartWithCapitalLetter"/>
<property name="message" value="@return tag description should start with capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="\* +@param +\w+ +[^A-Z]"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="ParamShouldStartWithCapitalLetter"/>
<property name="message" value="@param tag description should start with capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="/\*\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="FirstLetterInCommentShouldBeCapital"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="/\*\*\W+\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="FirstLetterInCommentShouldBeCapital2"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\(this\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="UsingThisAsLock"/>
<property name="message" value="Using THIS as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\([\w\.]\.class\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="UsingClassAsLock"/>
<property name="message" value="Using class as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="org\.apache\.commons\.(codec|lang3?)\.CharEncoding"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="UseStandardCharsets"/>
<property name="message" value="Use 'java.nio.charset.StandardCharsets' instead"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="com\.google\.common\.base\.Charsets"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="UseStandardJavaCharsets"/>
<property name="message" value="Use 'java.nio.charset.StandardCharsets' instead"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^(?! *(/\*\*|\*|/\*|//)).*[\.\-\+%/\*&lt;&gt;](?&lt;!(-&gt;)|&lt;*[A-Za-z]&gt;) *$"/>
<property name="fileExtensions" value="java"/>
<property name="id" value="EndOfLineSymbolLimits"/>
<property name="message" value="Line cannot end with this symbol, move it to the next line"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^ *="/>
<property name="fileExtensions" value="java"/>
<property name="id" value="StartLineSymbolLimits"/>
<property name="message" value="Line cannot start with this symbol, move it to the previous line"/>
</module>
<!-- Checks for Header -->
Expand Down Expand Up @@ -386,6 +399,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<module name="RegexpMultiline">
<property name="format" value="new java.util.ArrayList(?:&lt;.*?&gt;)?\(\)"/>
<property name="message" value="ArrayList should be initialized with a size parameter"/>
<property name="id" value="ArrayListShouldBeInitWithSize"/>
<property name="fileExtensions" value="java"/>
</module>
</module>

0 comments on commit fb289fb

Please sign in to comment.