You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2014/06/06 05:03:30 UTC

svn commit: r1600809 - in /commons/proper/bcel/trunk: LICENSE-header.txt checkstyle.xml pmd.xml pom.xml

Author: ggregory
Date: Fri Jun  6 03:03:30 2014
New Revision: 1600809

URL: http://svn.apache.org/r1600809
Log:
Add more reports: FindBugs, PMD, Checkstyle.

Added:
    commons/proper/bcel/trunk/LICENSE-header.txt   (with props)
    commons/proper/bcel/trunk/checkstyle.xml   (with props)
    commons/proper/bcel/trunk/pmd.xml   (with props)
Modified:
    commons/proper/bcel/trunk/pom.xml

Added: commons/proper/bcel/trunk/LICENSE-header.txt
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/LICENSE-header.txt?rev=1600809&view=auto
==============================================================================
--- commons/proper/bcel/trunk/LICENSE-header.txt (added)
+++ commons/proper/bcel/trunk/LICENSE-header.txt Fri Jun  6 03:03:30 2014
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */

Propchange: commons/proper/bcel/trunk/LICENSE-header.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/bcel/trunk/LICENSE-header.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Added: commons/proper/bcel/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/checkstyle.xml?rev=1600809&view=auto
==============================================================================
--- commons/proper/bcel/trunk/checkstyle.xml (added)
+++ commons/proper/bcel/trunk/checkstyle.xml Fri Jun  6 03:03:30 2014
@@ -0,0 +1,69 @@
+<?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 codec customization of default Checkstyle behavior -->
+<module name="Checker">
+  <property name="localeLanguage" value="en" />
+
+  <!-- Checks whether files end with a new line. -->
+  <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+  <module name="NewlineAtEndOfFile" />
+
+  <!-- Verify that EVERY source file has the appropriate license -->
+  <module name="Header">
+    <property name="headerFile" value="${checkstyle.header.file}" />
+  </module>
+
+  <!-- Checks for Tab characters -->
+  <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
+  <module name="FileTabCharacter">
+    <property name="fileExtensions" value="java" />
+  </module>
+
+  <!-- Checks for white space at the end of the line -->
+  <!-- See http://checkstyle.sourceforge.net/config_regexp.html -->
+  <module name="RegexpSingleline">
+    <property name="format" value="\s+$" />
+    <property name="message" value="Line has trailing spaces." />
+    <property name="fileExtensions" value="java" />
+  </module>
+
+  <!-- @author tags are deprecated -->
+  <module name="RegexpSingleline">
+    <property name="format" value="^\s+\*\s+@author\s" />
+    <property name="message" value="Deprecated @author tag" />
+    <property name="fileExtensions" value="java" />
+    <property name="severity" value="warning" />
+  </module>
+
+  <module name="TreeWalker">
+    <property name="cacheFile" value="target/cachefile" />
+    <module name="OperatorWrap">
+      <property name="option" value="eol" />
+    </module>
+    <module name="LineLength">
+      <property name="max" value="120"/>
+    </module>
+  </module>
+
+</module>
+

Propchange: commons/proper/bcel/trunk/checkstyle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/bcel/trunk/checkstyle.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: commons/proper/bcel/trunk/pmd.xml
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/pmd.xml?rev=1600809&view=auto
==============================================================================
--- commons/proper/bcel/trunk/pmd.xml (added)
+++ commons/proper/bcel/trunk/pmd.xml Fri Jun  6 03:03:30 2014
@@ -0,0 +1,26 @@
+<?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.
+-->
+<ruleset name="mybraces"
+    xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>Excludes from default PMD rules.</description>
+  <rule ref="rulesets/java/unusedcode.xml">
+    <exclude name="UnnecessaryParentheses"/>
+  </rule>
+</ruleset>
\ No newline at end of file

Propchange: commons/proper/bcel/trunk/pmd.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/bcel/trunk/pmd.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: commons/proper/bcel/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/pom.xml?rev=1600809&r1=1600808&r2=1600809&view=diff
==============================================================================
--- commons/proper/bcel/trunk/pom.xml (original)
+++ commons/proper/bcel/trunk/pom.xml Fri Jun  6 03:03:30 2014
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-parent</artifactId>
-    <version>33</version>
+    <version>34</version>
   </parent>
 
   <groupId>org.apache.bcel</groupId>
@@ -251,6 +251,56 @@
         </plugin>
       -->
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <!-- Use 2.9.1 instead of 2.10; 2.10 seems to scan the 'target'
+          dir and wants license headers in .properties to be the header for
+          Java files. -->
+        <version>2.9.1</version>
+        <configuration>
+          <configLocation>${basedir}/checkstyle.xml</configLocation>
+          <enableRulesSummary>false</enableRulesSummary>
+          <headerFile>${basedir}/LICENSE-header.txt</headerFile>
+        </configuration>
+        <!-- We need to specify reportSets because 2.9.1 creates two reports -->
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>checkstyle</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <targetJdk>${maven.compiler.target}</targetJdk>
+          <linkXref>true</linkXref>
+          <rulesets>
+            <ruleset>${basedir}/pmd.xml</ruleset>
+          </rulesets>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>2.5.4</version>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>taglist-maven-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <tags>
+            <tag>TODO</tag>
+            <tag>NOPMD</tag>
+            <tag>NOTE</tag>
+          </tags>
+        </configuration>
+      </plugin>
+      <plugin>
         <!-- generate a code coverage report -->
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>