commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: svn commit: r1447056 - in /commons/sandbox/beanutils2/trunk: checkstyle-suppressions.xml config/ config/HEADER.txt config/checkstyle-suppressions.xml config/checkstyle.xml pom.xml src/changes/changes.xml
Date Mon, 18 Feb 2013 10:46:41 GMT
Ah ok looks like I missed some detail here, I'll give another review
later - keep up the good work!

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/


On Mon, Feb 18, 2013 at 9:13 AM, Benedikt Ritter <britter@apache.org> wrote:
> Hi Simo,
>
> IIUC exclusions can only be defined for a hole checker. But
> allowUndeclaredRTE is a property of the JavadocMethod checker. I don't see
> how I can change the value of the property with an exclusion filter. So I
> had to copy the hole config just to change that one property (I documented
> this on top of config/checkstyle.xml).
>
> Am I missing something here?
>
> TIA!
> Benedikt
>
>
> 2013/2/17 Simone Tripodi <simonetripodi@apache.org>
>
>> rather than redeclaring the whole checkstyle rule, add the exclusion filter
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>>
>> On Sun, Feb 17, 2013 at 7:45 PM,  <britter@apache.org> wrote:
>> > Author: britter
>> > Date: Sun Feb 17 18:45:28 2013
>> > New Revision: 1447056
>> >
>> > URL: http://svn.apache.org/r1447056
>> > Log:
>> > [SANDBOX-440] - Configure Checkstyle to allow undeclared unchecked
>> Exceptions in JavaDoc
>> >
>> > Added:
>> >     commons/sandbox/beanutils2/trunk/config/
>> >     commons/sandbox/beanutils2/trunk/config/HEADER.txt   (with props)
>> >     commons/sandbox/beanutils2/trunk/config/checkstyle-suppressions.xml
>> >       - copied unchanged from r1444404,
>> commons/sandbox/beanutils2/trunk/checkstyle-suppressions.xml
>> >     commons/sandbox/beanutils2/trunk/config/checkstyle.xml   (with props)
>> > Removed:
>> >     commons/sandbox/beanutils2/trunk/checkstyle-suppressions.xml
>> > Modified:
>> >     commons/sandbox/beanutils2/trunk/pom.xml
>> >     commons/sandbox/beanutils2/trunk/src/changes/changes.xml
>> >
>> > Added: commons/sandbox/beanutils2/trunk/config/HEADER.txt
>> > URL:
>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/config/HEADER.txt?rev=1447056&view=auto
>> >
>> ==============================================================================
>> > --- commons/sandbox/beanutils2/trunk/config/HEADER.txt (added)
>> > +++ commons/sandbox/beanutils2/trunk/config/HEADER.txt Sun Feb 17
>> 18:45:28 2013
>> > @@ -0,0 +1,21 @@
>> > +^package
>> > +^\s*$
>> > +^/\*\s*$
>> > +^ \* Licensed to the Apache Software Foundation \(ASF\) under one\s*$
>> > +^ \* or more contributor license agreements.  See the NOTICE file\s*$
>> > +^ \* distributed with this work for additional information\s*$
>> > +^ \* regarding copyright ownership.  The ASF licenses this file\s*$
>> > +^ \* to you under the Apache License, Version 2.0 \(the\s*$
>> > +^ \* "License"\)\; you may not use this file except in compliance\s*$
>> > +^ \* with the License.  You may obtain a copy of the License at\s*$
>> > +^ \*\s*$
>> > +^ \*\s+http://www\.apache\.org/licenses/LICENSE-2\.0\s*$
>> > +^ \*\s*$
>> > +^ \* Unless required by applicable law or agreed to in writing,\s*$
>> > +^ \* software distributed under the License is distributed on an\s*$
>> > +^ \* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\s*$
>> > +^ \* KIND, either express or implied.  See the License for the\s*$
>> > +^ \* specific language governing permissions and limitations\s*$
>> > +^ \* under the License.\s*$
>> > +^ \*/\s*$
>> > +^\s*$
>> > \ No newline at end of file
>> >
>> > Propchange: commons/sandbox/beanutils2/trunk/config/HEADER.txt
>> >
>> ------------------------------------------------------------------------------
>> >     svn:eol-style = native
>> >
>> > Added: commons/sandbox/beanutils2/trunk/config/checkstyle.xml
>> > URL:
>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/config/checkstyle.xml?rev=1447056&view=auto
>> >
>> ==============================================================================
>> > --- commons/sandbox/beanutils2/trunk/config/checkstyle.xml (added)
>> > +++ commons/sandbox/beanutils2/trunk/config/checkstyle.xml Sun Feb 17
>> 18:45:28 2013
>> > @@ -0,0 +1,207 @@
>> > +<?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.2//EN"
>> > +    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
>> > +
>> > +<!--
>> > +  The following file is the maven_checks.xml from the maven checkstyle
>> > +  plugin that contains the coding conventions of the Apache Maven
>> project.
>> > +  The following changes have been made for BeanUtils2:
>> > +    - JavadocMethod.allowUndeclaredRTE -> true
>> > +  -->
>> > +
>> > +<!--
>> > +  Checkstyle configuration that checks the maven coding conventions
>> from:
>> > +-->
>> > +
>> > +<module name="Checker">
>> > +
>> > +    <!-- Checks that each Java package has a Javadoc file used for
>> commenting. -->
>> > +    <!-- See
>> http://checkstyle.sf.net/config_javadoc.html#JavadocPackage       -->
>> > +    <!--module name="JavadocPackage">
>> > +      <property name="allowLegacy" value="true"/>
>> > +    </module-->
>> > +
>> > +    <!-- Checks whether files end with a new line.
>>    -->
>> > +    <!-- See
>> http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
>> > +    <!-- module name="NewlineAtEndOfFile"/ -->
>> > +
>> > +    <!-- Checks that property files contain the same keys.         -->
>> > +    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
>> > +    <!-- module name="Translation"/ -->
>> > +
>> > +    <module name="FileLength"/>
>> > +
>> > +    <!-- Checks for Headers                              -->
>> > +    <!-- See http://checkstyle.sf.net/config_header.html -->
>> > +    <module name="RegexpHeader">
>> > +      <property name="headerFile" value="${checkstyle.header.file}"/>
>> > +    </module>
>> > +
>> > +    <module name="FileTabCharacter">
>> > +        <property name="eachLine" value="true"/>
>> > +    </module>
>> > +
>> > +    <!-- Line with trailing spaces (disabled as it's too noisy) -->
>> > +    <!--<module name="RegexpSingleline">
>> > +        <property name="format" value="\s+$"/>
>> > +        <property name="message" value="Line has trailing spaces."/>
>> > +    </module>-->
>> > +
>> > +    <module name="TreeWalker">
>> > +
>> > +        <property name="cacheFile" value="${checkstyle.cache.file}"/>
>> > +
>> > +        <property name="tabWidth" value="4"/>
>> > +
>> > +        <module name="LeftCurly">
>> > +          <property name="option" value="nl"/>
>> > +        </module>
>> > +
>> > +        <module name="RightCurly">
>> > +          <property name="option" value="alone"/>
>> > +        </module>
>> > +
>> > +        <module name="LineLength">
>> > +          <property name="max" value="120" />
>> > +          <property name="ignorePattern"
>> value="@version|@see|@todo|TODO"/>
>> > +        </module>
>> > +
>> > +        <module name="MemberName" />
>> > +
>> > +        <!-- Checks for Javadoc comments.                     -->
>> > +        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
>> > +        <module name="JavadocMethod">
>> > +          <property name="severity" value="warning"/>
>> > +          <property name="scope" value="protected"/>
>> > +          <property name="allowUndeclaredRTE" value="true"/>
>> > +        </module>
>> > +        <module name="JavadocType">
>> > +          <property name="scope" value="protected"/>
>> > +        </module>
>> > +        <module name="JavadocVariable">
>> > +          <property name="severity" value="info"/>
>> > +          <property name="scope" value="protected"/>
>> > +        </module>
>> > +
>> > +
>> > +        <!-- Checks for Naming Conventions.                  -->
>> > +        <!-- See http://checkstyle.sf.net/config_naming.html -->
>> > +        <module name="ConstantName"/>
>> > +        <module name="LocalFinalVariableName"/>
>> > +        <module name="LocalVariableName"/>
>> > +        <module name="MethodName"/>
>> > +        <module name="PackageName"/>
>> > +        <module name="ParameterName"/>
>> > +        <module name="StaticVariableName"/>
>> > +        <module name="TypeName"/>
>> > +
>> > +        <!-- Checks for imports                              -->
>> > +        <!-- See http://checkstyle.sf.net/config_import.html -->
>> > +        <module name="AvoidStarImport"/>
>> > +        <module name="IllegalImport"/>
>> > +        <module name="RedundantImport"/>
>> > +        <module name="UnusedImports"/>
>> > +
>> > +
>> > +        <!-- Checks for Size Violations.                    -->
>> > +        <!-- See http://checkstyle.sf.net/config_sizes.html -->
>> > +        <module name="MethodLength"/>
>> > +        <module name="ParameterNumber"/>
>> > +
>> > +
>> > +        <!-- Checks for whitespace                               -->
>> > +        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
>> > +        <module name="EmptyForIteratorPad">
>> > +          <property name="option" value="space"/>
>> > +        </module>
>> > +        <!-- module name="NoWhitespaceAfter"/ -->
>> > +        <!-- module name="NoWhitespaceBefore"/ -->
>> > +        <module name="OperatorWrap"/>
>> > +        <module name="ParenPad">
>> > +          <property name="option" value="space" />
>> > +        </module>
>> > +        <module name="WhitespaceAfter"/>
>> > +        <module name="WhitespaceAround"/>
>> > +        <!-- module name="MethodParamPad"/ -->
>> > +
>> > +
>> > +        <!-- Modifier Checks                                    -->
>> > +        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
>> > +        <module name="ModifierOrder"/>
>> > +        <module name="RedundantModifier"/>
>> > +
>> > +
>> > +        <!-- Checks for blocks. You know, those {}'s         -->
>> > +        <!-- See http://checkstyle.sf.net/config_blocks.html -->
>> > +        <module name="AvoidNestedBlocks"/>
>> > +        <module name="EmptyBlock">
>> > +          <property name="option" value="text"/>
>> > +        </module>
>> > +        <module name="NeedBraces"/>
>> > +
>> > +
>> > +        <!-- Checks for common coding problems               -->
>> > +        <!-- See http://checkstyle.sf.net/config_coding.html -->
>> > +        <!-- module name="AvoidInlineConditionals"/ -->
>> > +        <module name="DoubleCheckedLocking"/>
>> > +        <module name="EmptyStatement"/>
>> > +        <module name="EqualsHashCode"/>
>> > +        <module name="HiddenField">
>> > +          <property name="severity" value="warning"/>
>> > +          <property name="ignoreSetter" value="true"/>
>> > +          <property name="ignoreConstructorParameter" value="true"/>
>> > +        </module>
>> > +        <module name="IllegalInstantiation"/>
>> > +        <module name="InnerAssignment"/>
>> > +        <module name="MagicNumber">
>> > +          <!-- some numbers are really not that magic -->
>> > +          <property name="ignoreNumbers" value="-4, -3, -2, -1, 0, 1,
>> 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64, 100, 128, 256,
>> 512, 1000, 1024"/>
>> > +        </module>
>> > +        <module name="MissingSwitchDefault"/>
>> > +        <module name="RedundantThrows"/>
>> > +        <module name="SimplifyBooleanExpression"/>
>> > +        <module name="SimplifyBooleanReturn"/>
>> > +
>> > +        <!-- Checks for class design                         -->
>> > +        <!-- See http://checkstyle.sf.net/config_design.html -->
>> > +        <!-- module name="DesignForExtension"/ -->
>> > +        <!-- module name="FinalClass"/ -->
>> > +        <!-- module name="HideUtilityClassConstructor"/ -->
>> > +        <module name="InterfaceIsType"/>
>> > +        <module name="VisibilityModifier">
>> > +          <property name="protectedAllowed" value="true"/>
>> > +          <property name="packageAllowed" value="true"/>
>> > +        </module>
>> > +
>> > +        <!-- Miscellaneous other checks.                   -->
>> > +        <!-- See http://checkstyle.sf.net/config_misc.html -->
>> > +        <!-- module name="ArrayTypeStyle"/ -->
>> > +        <!-- module name="FinalParameters"/ -->
>> > +        <!-- Let todo plugin handle this.
>> > +        <module name="TodoComment"/>
>> > +          -->
>> > +        <module name="UpperEll"/>
>> > +
>> > +    </module>
>> > +
>> > +</module>
>> >
>> > Propchange: commons/sandbox/beanutils2/trunk/config/checkstyle.xml
>> >
>> ------------------------------------------------------------------------------
>> >     svn:eol-style = native
>> >
>> > Modified: commons/sandbox/beanutils2/trunk/pom.xml
>> > URL:
>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/pom.xml?rev=1447056&r1=1447055&r2=1447056&view=diff
>> >
>> ==============================================================================
>> > --- commons/sandbox/beanutils2/trunk/pom.xml (original)
>> > +++ commons/sandbox/beanutils2/trunk/pom.xml Sun Feb 17 18:45:28 2013
>> > @@ -205,10 +205,10 @@
>> >          <artifactId>maven-checkstyle-plugin</artifactId>
>> >          <version>2.7</version>
>> >          <configuration>
>> > -          <configLocation>config/maven_checks.xml</configLocation>
>> > -          <headerLocation>config/maven-header.txt</headerLocation>
>> > -
>>  <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
>> > -
>>  <suppressionsFileExpression>${basedir}/checkstyle-suppressions.xml</suppressionsFileExpression>
>> > +
>>  <configLocation>${basedir}/config/checkstyle.xml</configLocation>
>> > +          <headerLocation>${basedir}/config/HEADER.txt</headerLocation>
>> > +
>>  <suppressionsLocation>${basedir}/config/checkstyle-suppressions.xml</suppressionsLocation>
>> > +
>>  <suppressionsFileExpression>${basedir}/config/checkstyle-suppressions.xml</suppressionsFileExpression>
>> >          </configuration>
>> >        </plugin>
>> >        <plugin>
>> >
>> > Modified: commons/sandbox/beanutils2/trunk/src/changes/changes.xml
>> > URL:
>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/changes/changes.xml?rev=1447056&r1=1447055&r2=1447056&view=diff
>> >
>> ==============================================================================
>> > --- commons/sandbox/beanutils2/trunk/src/changes/changes.xml (original)
>> > +++ commons/sandbox/beanutils2/trunk/src/changes/changes.xml Sun Feb 17
>> 18:45:28 2013
>> > @@ -23,6 +23,9 @@
>> >    </properties>
>> >    <body>
>> >    <release version="0.1" date="201?-??-??" description="First release.">
>> > +    <action dev="britter" type="update" issue="SANDBOX-440">
>> > +      Configure Checkstyle to allow undeclared unchecked Exceptions in
>> JavaDoc
>> > +    </action>
>> >      <action dev="britter" type="update" issue="SANDBOX-442">
>> >        Remove IntrospectionException from BeanProperties methods by
>> wrapping it internally
>> >      </action>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message