Skip to content

Commit db2e5d3

Browse files
committed
Mayur | replace codequality plugin with checkstyle and jacoco plugins
1 parent a0f73c4 commit db2e5d3

File tree

3 files changed

+184
-1
lines changed

3 files changed

+184
-1
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ classes
88
generated
99
*.ipr
1010
*.iws
11-
config/checkstyle
1211
.classpath
1312
.project
1413
.settings

config/checkstyle/checkstyle.xml

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
6+
<module name="Checker">
7+
<!--
8+
If you set the basedir property below, then all reported file
9+
names will be relative to the specified directory. See
10+
http://checkstyle.sourceforge.net/5.x/config.html#Checker
11+
12+
<property name="basedir" value="${basedir}"/>
13+
-->
14+
<module name="SuppressionFilter">
15+
<property name="file" value="config/checkstyle/suppressions.xml"/>
16+
<property name="optional" value="false"/>
17+
</module>
18+
19+
<property name="fileExtensions" value="java, properties, xml"/>
20+
21+
<!-- Checks whether files end with a new line. -->
22+
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
23+
<module name="NewlineAtEndOfFile">
24+
<property name="lineSeparator" value="lf" />
25+
</module>
26+
27+
<!-- Checks that property files contain the same keys. -->
28+
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
29+
<module name="Translation"/>
30+
31+
<!-- Ignore checkstyle for a particular line of code -->
32+
<!-- See http://checkstyle.sf.net/config_filters.html#SuppressWithNearbyCommentFilter -->
33+
<module name="SuppressWithNearbyCommentFilter">
34+
<property name="commentFormat" value="SUPPRESS CHECKSTYLE"/>
35+
<property name="checkFormat" value=".*"/>
36+
<property name="influenceFormat" value="0"/>
37+
</module>
38+
39+
<!-- Checks for Size Violations. -->
40+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
41+
<module name="FileLength"/>
42+
43+
<!-- Checks for whitespace -->
44+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
45+
<module name="FileTabCharacter"/>
46+
47+
<!-- Miscellaneous other checks. -->
48+
<!-- See http://checkstyle.sf.net/config_misc.html -->
49+
<module name="RegexpSingleline">
50+
<property name="format" value="\s+$"/>
51+
<property name="minimum" value="0"/>
52+
<property name="maximum" value="0"/>
53+
<property name="message" value="Line has trailing spaces."/>
54+
</module>
55+
56+
<!-- Checks for Headers -->
57+
<!-- See http://checkstyle.sf.net/config_header.html -->
58+
<!-- <module name="Header"> -->
59+
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
60+
<!-- <property name="fileExtensions" value="java"/> -->
61+
<!-- </module> -->
62+
63+
<module name="TreeWalker">
64+
65+
<module name="FileContentsHolder"/>
66+
67+
<!-- Checks for Javadoc comments. -->
68+
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
69+
<module name="JavadocStyle"/>
70+
71+
<!-- Checks for Naming Conventions. -->
72+
<!-- See http://checkstyle.sf.net/config_naming.html -->
73+
<module name="ConstantName"/>
74+
<module name="LocalFinalVariableName"/>
75+
<module name="LocalVariableName"/>
76+
<module name="MemberName"/>
77+
<module name="MethodName"/>
78+
<module name="PackageName"/>
79+
<module name="ParameterName"/>
80+
<module name="StaticVariableName"/>
81+
<module name="TypeName"/>
82+
83+
<!-- Checks for imports -->
84+
<!-- See http://checkstyle.sf.net/config_import.html -->
85+
<module name="AvoidStarImport">
86+
<property name="allowStaticMemberImports" value="true"/>
87+
</module>
88+
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
89+
<module name="RedundantImport"/>
90+
<module name="UnusedImports">
91+
<property name="processJavadoc" value="false"/>
92+
</module>
93+
94+
<!-- Checks for Size Violations. -->
95+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
96+
<module name="MethodLength"/>
97+
<module name="ParameterNumber"/>
98+
99+
<!-- Checks for whitespace -->
100+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
101+
<module name="EmptyForIteratorPad"/>
102+
<module name="GenericWhitespace"/>
103+
<module name="MethodParamPad"/>
104+
<module name="NoWhitespaceAfter"/>
105+
<module name="NoWhitespaceBefore"/>
106+
<module name="OperatorWrap"/>
107+
<module name="ParenPad"/>
108+
<module name="TypecastParenPad"/>
109+
<module name="WhitespaceAfter"/>
110+
<module name="WhitespaceAround"/>
111+
112+
<!-- Modifier Checks -->
113+
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
114+
<module name="ModifierOrder"/>
115+
<module name="RedundantModifier"/>
116+
117+
<!-- Checks for blocks. You know, those {}'s -->
118+
<!-- See http://checkstyle.sf.net/config_blocks.html -->
119+
<module name="AvoidNestedBlocks"/>
120+
<module name="EmptyBlock"/>
121+
<module name="LeftCurly"/>
122+
<module name="NeedBraces"/>
123+
<module name="RightCurly"/>
124+
125+
<!-- Checks for common coding problems -->
126+
<!-- See http://checkstyle.sf.net/config_coding.html -->
127+
<module name="EmptyStatement"/>
128+
<module name="EqualsHashCode"/>
129+
130+
<module name="HiddenField">
131+
<property name="ignoreSetter" value="true"/>
132+
<!-- For Builder classes -->
133+
<property name="setterCanReturnItsClass" value="true"/>
134+
<property name="ignoreConstructorParameter" value="true"/>
135+
</module>
136+
137+
<module name="IllegalInstantiation"/>
138+
<module name="InnerAssignment"/>
139+
<module name="MagicNumber"/>
140+
<module name="MissingSwitchDefault"/>
141+
<module name="SimplifyBooleanExpression"/>
142+
<module name="SimplifyBooleanReturn"/>
143+
144+
<!-- Checks for class design -->
145+
<!-- See http://checkstyle.sf.net/config_design.html -->
146+
<module name="FinalClass"/>
147+
<module name="InterfaceIsType"/>
148+
<module name="VisibilityModifier"/>
149+
150+
<!-- Miscellaneous other checks. -->
151+
<!-- See http://checkstyle.sf.net/config_misc.html -->
152+
<module name="ArrayTypeStyle"/>
153+
<module name="TodoComment"/>
154+
<module name="UpperEll"/>
155+
156+
</module>
157+
158+
<!-- Disabled modules within Checker module -->
159+
<!--<module name="JavadocPackage"/>-->
160+
161+
162+
<!-- Disabled modules within TreeWalker module -->
163+
<!--<module name="JavadocMethod"/>-->
164+
<!--<module name="JavadocType"/>-->
165+
<!--<module name="JavadocVariable"/>-->
166+
<!--<module name="LineLength"/>-->
167+
<!--<module name="DesignForExtension"/>-->
168+
<!--<module name="HideUtilityClassConstructor"/>-->
169+
<!--<module name="FinalParameters"/>-->
170+
<!--<module name="AvoidInlineConditionals"/>-->
171+
172+
</module>

config/checkstyle/suppressions.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
5+
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
6+
7+
<suppressions>
8+
<suppress checks="AvoidStarImport"
9+
files=".*Test.java"/>
10+
<suppress checks="MagicNumber"
11+
files=".*Test.java"/>
12+
</suppressions>

0 commit comments

Comments
 (0)