Skip to content

Commit 369259c

Browse files
Sebastian JustSebastian Just
authored andcommitted
Added checkstyle with deprecated methods
Marked deprecated functions of the DynamoDB SDK in checkstyle. Also updated Cobertura configuration
1 parent 9b41a1f commit 369259c

File tree

2 files changed

+55
-30
lines changed

2 files changed

+55
-30
lines changed

checkstyle.xml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,29 @@
33
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
44
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
55
<module name="Checker">
6-
<module name="RegexpSingleline">
7-
<!-- \s matches whitespace character, $ matches end of line. -->
6+
<!--
7+
<module name="RegexpSingleline">-->
8+
<!-- \s matches whitespace character, $ matches end of line. --><!--
89
<property name="format" value="\s+$" />
910
</module>
1011
<module name="FileTabCharacter">
1112
<property name="eachLine" value="true" />
1213
</module>
14+
-->
1315
<module name="TreeWalker">
1416
<module name="ModifierOrder" />
1517
<module name="EmptyBlock" />
1618
<module name="AvoidStarImport" />
1719
<module name="UnusedImports" />
20+
<!--
1821
<module name="ImportOrder">
1922
<property name="ordered" value="true" />
2023
<property name="separated" value="true" />
2124
<property name="option" value="top" />
2225
<property name="sortStaticImportsAlphabetically"
2326
value="true" />
2427
</module>
25-
28+
-->
2629
<module name="RegexpSinglelineJava">
2730
<property name="format" value="System\.out(?:\.|::)println"/>
2831
</module>
@@ -32,5 +35,25 @@
3235
<module name="RegexpSinglelineJava">
3336
<property name="format" value="\.printStackTrace"/>
3437
</module>
38+
<!-- Deprecated DynamoDB paramters -->
39+
<module name="RegexpSinglelineJava">
40+
<property name="format" value="setKeyConditions"/>
41+
</module>
42+
<module name="RegexpSinglelineJava">
43+
<property name="format" value="withKeyConditions"/>
44+
</module>
45+
<module name="RegexpSinglelineJava">
46+
<property name="format" value="setQueryFilter"/>
47+
</module>
48+
<module name="RegexpSinglelineJava">
49+
<property name="format" value="withQueryFilter"/>
50+
</module>
51+
<module name="RegexpSinglelineJava">
52+
<property name="format" value="setScanFilter"/>
53+
</module>
54+
<module name="RegexpSinglelineJava">
55+
<property name="format" value="withScanFilter"/>
56+
</module>
57+
3558
</module>
3659
</module>

pom.xml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
2222
<aws-java-sdk.version>1.10.39</aws-java-sdk.version>
2323
<mockito.version>1.10.19</mockito.version>
24+
<maven.cobertura.plugin.version>2.7</maven.cobertura.plugin.version>
2425

2526
<cdi>1.2</cdi>
2627
<commons.lang>3.4</commons.lang>
2728

2829
<maven.compiler.source>1.7</maven.compiler.source>
2930
<maven.compiler.target>1.7</maven.compiler.target>
31+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3033
</properties>
3134

3235
<dependencyManagement>
@@ -134,30 +137,34 @@
134137
</dependencies>
135138

136139
<build>
137-
<pluginManagement>
138-
<plugins>
139-
<plugin>
140-
<groupId>org.apache.maven.plugins</groupId>
141-
<artifactId>maven-checkstyle-plugin</artifactId>
142-
<version>2.15</version>
143-
<dependencies>
144-
<dependency>
145-
<groupId>com.puppycrawl.tools</groupId>
146-
<artifactId>checkstyle</artifactId>
147-
<version>6.6</version>
148-
</dependency>
149-
</dependencies>
150-
<configuration>
151-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
152-
<failOnViolation>false</failOnViolation>
153-
</configuration>
154-
</plugin>
155-
</plugins>
156-
</pluginManagement>
157140
<plugins>
141+
<plugin>
142+
<groupId>org.codehaus.mojo</groupId>
143+
<artifactId>cobertura-maven-plugin</artifactId>
144+
<version>${maven.cobertura.plugin.version}</version>
145+
<configuration>
146+
<formats>
147+
<format>xml</format>
148+
<format>html</format>
149+
</formats>
150+
<check>
151+
<totalBranchRate>85</totalBranchRate>
152+
<totalLineRate>91</totalLineRate>
153+
<haltOnFailure>true</haltOnFailure>
154+
</check>
155+
</configuration>
156+
</plugin>
158157
<plugin>
159158
<groupId>org.apache.maven.plugins</groupId>
160159
<artifactId>maven-checkstyle-plugin</artifactId>
160+
<version>2.15</version>
161+
<dependencies>
162+
<dependency>
163+
<groupId>com.puppycrawl.tools</groupId>
164+
<artifactId>checkstyle</artifactId>
165+
<version>6.6</version>
166+
</dependency>
167+
</dependencies>
161168
<executions>
162169
<execution>
163170
<id>verify-style</id>
@@ -168,6 +175,7 @@
168175
</execution>
169176
</executions>
170177
<configuration>
178+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
171179
<logViolationsToConsole>true</logViolationsToConsole>
172180
<configLocation>checkstyle.xml</configLocation>
173181
</configuration>
@@ -243,11 +251,6 @@
243251
</execution>
244252
</executions>
245253
</plugin>
246-
<plugin>
247-
<groupId>org.codehaus.mojo</groupId>
248-
<artifactId>cobertura-maven-plugin</artifactId>
249-
<version>2.5.1</version>
250-
</plugin>
251254

252255
<plugin>
253256
<groupId>org.apache.maven.plugins</groupId>
@@ -264,8 +267,7 @@
264267
<url>https://github.com/derjust/spring-data-dynamodb</url>
265268
<connection>scm:git:ssh://github.com/derjust/spring-data-dynamodb.git</connection>
266269
<developerConnection>scm:git:ssh://[email protected]/derjust/spring-data-dynamodb.git</developerConnection>
267-
<tag>spring-data-dynamodb-1.0.5</tag>
268-
</scm>
270+
</scm>
269271

270272
<repositories>
271273
<repository>

0 commit comments

Comments
 (0)