Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#234 Problem with UnusedLocalVariable, UnusedParameter

release_3.4
closed
Rick Giles
5
2012-10-10
2004-06-10
Suyash Apte
No

3.4 documention has following modules:
UnusedLocalVariable, UnusedParameter,
UnusedPrivateField, UnusedPrivateMethod

Including following in configuration file

<module name="UnusedLocalVariable">
<property name="ignoreFormat" value="^$"/>
<property name="severity" value="warning"/>
</module>
<module name="UnusedParameter">
<property name="ignoreCatch" value="true"/>
<property name="ignoreFormat" value="^$"/>
<property name="severity" value="warning"/>
</module>
<module name="UnusedPrivateField">
<property name="ignoreFormat" value="^$"/>
<property name="severity" value="warning"/>
</module>
<module name="UnusedPrivateMethod">
<property name="ignoreFormat" value="^$"/>
<property name="severity" value="warning"/>
</module>

reults in error " Unable to create a Checker: cannot
initialize module TreeWalker - Unable to instantiate
UnusedLocalVariable"

Discussion

  • Rick Giles
    Rick Giles
    2004-06-11

    Logged In: YES
    user_id=539926

    The most likely reason for this problem is that
    checkstyle-optional-3.4.jar is not in the classpath. Make
    sure that it is. If that solves the problem, please delete
    this bug report; otherwise, re-open it.