Skip to content
Permalink
Browse files
CRYPTO-68: Enable common code quality reports.
This adds the following reports to the site build:
- findbugs (findbugs profile has been removed)
- checkstyle (checkstyle configuration copied from commons-lang)
- pmd
- taglist
- JavaNCSS

Furthermore the RAT configuration has been moved to the reporting
section of pom.xml
  • Loading branch information
britter authored and sundapeng committed Jun 15, 2016
1 parent 7b106a4 commit 617dbfb03fc41170e37463cdb767f5a635a4f4f1
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 52 deletions.
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">

<!-- commons lang customization of default Checkstyle behavior -->
<module name="Checker">
<property name="localeLanguage" value="en"/>
<module name="JavadocPackage">
<!-- setting allowLegacy means it will check for package.html instead of just package-info.java -->
<property name="allowLegacy" value="true"/>
</module>
<module name="FileTabCharacter">
<property name="fileExtensions" value="java,xml"/>
</module>
<module name="TreeWalker">
<property name="cacheFile" value="target/cachefile"/>
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="NeedBraces"/>
<module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
</module>
</module>
</module>
151 pom.xml
@@ -218,7 +218,6 @@ The following provides more details on the included cryptographic software:
User is able to specify the platform by maven profiles.-->
<target.name>all</target.name>
<maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
<findbugs-maven-plugin.version>3.0.2</findbugs-maven-plugin.version>
<junit.version>4.12</junit.version>
<commons-logging.version>1.1.3</commons-logging.version>
<slf4j-api.version>1.7.10</slf4j-api.version>
@@ -272,43 +271,6 @@ The following provides more details on the included cryptographic software:
<target.name>linux-aarch64</target.name>
</properties>
</profile>
<!-- FindBugs -->
<profile>
<id>findbugs</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
<configuration>
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
<!--
Enables analysis which takes more memory but finds more bugs.
If you run out of memory, changes the value of the effort element
to 'Low'.
-->
<effort>Max</effort>
<failOnError>true</failOnError>
<threshold>Low</threshold>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<licenses>
<license>
@@ -388,20 +350,6 @@ The following provides more details on the included cryptographic software:
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${commons.rat.version}</version>
<configuration>
<excludes>
<exclude>.gitattributes</exclude>
<exclude>.gitignore</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>**/build/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.commons</groupId>
<artifactId>commons-build-plugin</artifactId>
@@ -429,6 +377,105 @@ The following provides more details on the included cryptographic software:
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version>
<configuration>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<!-- Requires setting 'export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" ' -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<!-- Use version from parent pom as that is adjusted according to the Java version used to run Maven -->
<version>${commons.findbugs.version}</version>
<configuration>
<excludeFilterFile>${basedir}/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.5</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>Needs Work</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>FIXME</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>XXX</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Noteable Markers</displayName>
<tags>
<tag>
<matchString>NOTE</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>NOPMD</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>NOSONAR</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
</tagClasses>
</tagListOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>.gitattributes</exclude>
<exclude>.gitignore</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>**/build/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -39,6 +39,7 @@
</properties>
<body>
<release version="1.0.0" date="2016-06-06" description="Feature and bug fix release">
<action issue="CRYPTO-68" type="add" dev="britter" >Enable common code quality reports.</action>
<action issue="CRYPTO-65" type="fix" dev="britter" due-to="sebb">Warnings compiling on MacOSX - JNIEXPORT redefined.</action>
<action issue="CRYPTO-11" type="add" dev="Ke Jia" due-to="Ke Jia, Jerry Chen">User guide documentation .</action>
<action issue="CRYPTO-12" type="add" dev="Xianda Ke" due-to="Xianda Ke">Rename CryptoInputStream to CipherInputStream and CryptoOutputStream to CipherOutputStream .</action>

0 comments on commit 617dbfb

Please sign in to comment.