Skip to content

Commit

Permalink
[misc] Added new checkstyle rules introduced in recent versions of th…
Browse files Browse the repository at this point in the history
…e Checkstyle tool
  • Loading branch information
sdumitriu committed Sep 12, 2014
1 parent c53b19b commit c0df5bd
Showing 1 changed file with 46 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<property name="message" value="No @author tag allowed"/>
</module>

<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
</module>

<!-- We cannot use this rule as it fails on our license headers, considering them as copy-pastes!
<module name="StrictDuplicateCode"/>
-->
Expand Down Expand Up @@ -87,10 +91,14 @@

<module name="BooleanExpressionComplexity"/>

<!-- This is a good metric but checkstyle doesn't allow to remove JDK's base classes
from the new count thus making this check unusable IMO
<module name="ClassDataAbstractionCoupling"/>
-->
<module name="ClassDataAbstractionCoupling">
<property name="excludedClasses" value="boolean, byte, char, double, float, int, long, short, void,
Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void,
Object, Class, String, StringBuffer, StringBuilder,
ArrayIndexOutOfBoundsException, Exception, RuntimeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, NullPointerException, Throwable, SecurityException, UnsupportedOperationException,
List, ArrayList, Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map, HashMap, SortedMap, TreeMap,
ConcurrentHashMap, ConcurrentLinkedDeque, ConcurrentLinkedQueue, DelayQueue, FutureTask, LinkedBlockinDeque, LinkedBlockinQueue, Phaser, PriorityBlockingQueue, RejectedExecutionException, SynchronousQueue"/>
</module>

<module name="ClassFanOutComplexity">
<property name="excludedClasses" value="boolean, byte, char, double, float, int, long, short, void,
Expand Down Expand Up @@ -131,6 +139,8 @@

<module name="EmptyStatement"/>

<module name="EqualsAvoidNull"/>

<module name="EqualsHashCode"/>

<module name="ExecutableStatementCount"/>
Expand All @@ -145,6 +155,8 @@

<!--module name="FinalParameters"/-->

<module name="GenericWhitespace"/>

<!-- Avoid finalizers (this will not find violations that contain linebreaks) -->
<module name="RegexpSinglelineJava">
<property name="format" value="((public)|(protected))\s+void\s+finalize\(\s*\)"/>
Expand Down Expand Up @@ -176,7 +188,12 @@

<!--module name="ImportControl"/-->

<!--module name="ImportOrder"/-->
<module name="ImportOrder">
<property name="groups" value="java,javax,org,com"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="option" value="bottom"/>
</module>

<module name="Indentation"/>

Expand Down Expand Up @@ -223,6 +240,8 @@

<module name="MemberName"/>

<module name="MethodCount"/>

<module name="MethodLength"/>

<!-- Allow for UI methods generated by idea -->
Expand All @@ -232,8 +251,14 @@

<module name="MethodParamPad"/>

<module name="MethodTypeParameterName"/>

<!--module name="MissingCtor"/-->

<!--module name="MissingDeprecated"/-->

<module name="MissingOverride"/>

<module name="MissingSwitchDefault"/>

<module name="ModifiedControlVariable"/>
Expand All @@ -250,12 +275,20 @@

<module name="NeedBraces"/>

<module name="NestedForDepth">
<property name="max" value="2"/>
</module>

<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>

<module name="NestedTryDepth"/>

<!--module name="NoClone"/-->

<!--module name="NoFinalizer"/-->

<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
</module>
Expand All @@ -264,8 +297,16 @@

<module name="NPathComplexity"/>

<module name="OneStatementPerLine"/>

<module name="OperatorWrap"/>

<module name="OuterTypeFilename"/>

<module name="OuterTypeNumber"/>

<module name="PackageAnnotation"/>

<module name="PackageDeclaration"/>

<module name="PackageName"/>
Expand Down

4 comments on commit c0df5bd

@vmassol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this discussed and agreed? I don't think so... I don't think any dev should modify the rules without proposing them first...

Also I've started a thread about the rules we wish to apply but nobody has replied yet, see http://xwiki.markmail.org/thread/vnggoomrbqbfaojn

@vmassol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially since there are ongoing discussions about rules in a thread started by caleb. I'd like to reply to that thread but right now the build is failing and I'm spending 100% of my energy trying to fix it... and preparing for the 6.2 release...

breaking the build and not fixing it... been broken for 1 day 3 hours before I fixed it...

@sdumitriu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pull request, for discussing and agreeing.

@vmassol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sorry I missed that it was on a branch

Please sign in to comment.