Hi All.
I was trying to integrate a custom checkstyle configuration file with my
project and am getting the following exception:

*[INFO] Error during page generation*
*Embedded error: Error rendering Maven report: Failed during checkstyle
configuration
Unable to instantiate WriteTagCheck*

The checkstyle file I am using works perfectly with eclipse when I try to do
a checkstyle check from eclipse.
But when I try to create a site using mvn site command I get the above
exception.

I have pasted the checkstyle file I am using below.
Is there something wrong with the checkstyle file syntax?
any pointers  to possible solutions would be of great help to me.

Many Thanks
Shinjan

my_checkstyle_config.xml
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!--
 This configuration file was written by the eclipse-cs plugin configuration
editor
-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "
http://www.puppycrawl.com/dtds/configuration_1_2.dtd";>
<module name="Checker">
    <property name="severity" value="warning"/>
    <module name="TreeWalker">
        <property name="tabWidth" value="4"/>
        <module name="JavadocMethod"/>
        <module name="JavadocType"/>
        <module name="JavadocVariable"/>
        <module name="JavadocStyle"/>
        <module name="ConstantName"/>
        <module name="LocalFinalVariableName"/>
        <module name="LocalVariableName"/>
        <module name="MemberName"/>
        <module name="MethodName"/>
        <module name="PackageName"/>
        <module name="ParameterName"/>
        <module name="StaticVariableName"/>
        <module name="TypeName"/>
        <module name="AvoidStarImport"/>
        <module name="IllegalImport"/>
        <module name="RedundantImport"/>
        <module name="UnusedImports"/>
        <module name="FileLength"/>
        <module name="LineLength">
            <property name="ignorePattern" value="^import"/>
  </module>
        <module name="MethodLength"/>
        <module name="ParameterNumber"/>
        <module name="EmptyForIteratorPad"/>
        <module name="MethodParamPad"/>
        <module name="NoWhitespaceAfter">
            <property name="tokens"
value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
        </module>
        <module name="NoWhitespaceBefore"/>
        <module name="OperatorWrap"/>
        <module name="ParenPad"/>
        <module name="TypecastParenPad"/>
        <module name="TabCharacter">
            <property name="severity" value="ignore"/>
        </module>
        <module name="WhitespaceAfter"/>
        <module name="WhitespaceAround"/>
        <module name="ModifierOrder"/>
        <module name="RedundantModifier"/>
        <module name="AvoidNestedBlocks"/>
        <module name="EmptyBlock"/>
        <module name="LeftCurly">
            <property name="option" value="nl"/>
        </module>
        <module name="NeedBraces"/>
        <module name="RightCurly">
            <property name="option" value="alone"/>
        </module>
        <module name="AvoidInlineConditionals"/>
        <module name="DoubleCheckedLocking"/>
        <module name="EmptyStatement"/>
        <module name="EqualsHashCode"/>
        <module name="HiddenField"/>
        <module name="IllegalInstantiation"/>
        <module name="InnerAssignment"/>
        <module name="MagicNumber"/>
        <module name="MissingSwitchDefault"/>
        <module name="RedundantThrows"/>
        <module name="SimplifyBooleanExpression"/>
        <module name="SimplifyBooleanReturn"/>
        <module name="FinalClass"/>
        <module name="HideUtilityClassConstructor"/>
        <module name="InterfaceIsType"/>
        <module name="VisibilityModifier"/>
        <module name="ArrayTypeStyle"/>
        <module name="FinalParameters"/>
        <module name="GenericIllegalRegexp">
            <property name="severity" value="error"/>
            <property name="format"
value="System.out.println()|printStackTrace()"/>
            <property name="ignoreCase" value="true"/>
            <property name="message" value="usage of System.out.println() or
printStackTrace()"/>
        </module>
        <module name="TodoComment">
            <property name="severity" value="ignore"/>
        </module>
        <module name="UpperEll"/>
        <module name="ExecutableStatementCount">
            <property name="max" value="25"/>
            <property name="tokens"
value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
        </module>
        <module name="ExecutableStatementCount">
            <property name="severity" value="error"/>
            <property name="max" value="35"/>
            <property name="tokens"
value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
        </module>
        <module name="CyclomaticComplexity">
            <property name="max" value="7"/>
        </module>
        <module name="CyclomaticComplexity">
            <property name="severity" value="error"/>
        </module>
        <module name="WriteTag">
            <metadata name="com.atlassw.tools.eclipse.checkstyle.comment"
value="Author name should be &quot;Company\Author&quot;"/>
            <property name="tag" value="@author"/>
            <property name="tagFormat" value="[A-Z]*\\[A-Z]*"/>
            <property name="tagSeverity" value="ignore"/>
        </module>
    </module>
    <module name="NewlineAtEndOfFile"/>
    <module name="Translation"/>
</module>

Reply via email to