Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-54

checkstyle:check does not see provided scope dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None
    • None

    Description

      Running checkstyle:check against a project that uses Exceptions from dependencies that are provided scope causes checktyle errors such as the following:

      <file name="/share/duncans/workspace/eclipse/cdcie-webapp-feedreader/src/main/java/mil/jfcom/cie/portal/feedreader/converter/ConverterImpl.java">
      <error line="0" severity="error" message="Got an exception - java.lang.RuntimeException: Unable to get class information for ValidationException." source="com.puppyc
      rawl.tools.checkstyle.TreeWalker"/>

      These errors go away when the scope is changed to compile. This does not happen for checkstyle:checkstyle; the report correct indicates no checkstyle errors. This is preventing us from using the checkstyle plugin to enforce checkstyle rules.

      Attachments

        1. MCHECKSTYLE-54.zip
          1 kB
          Benjamin Bentmann
        2. requires-dep-resolution.patch
          0.6 kB
          Benjamin Bentmann

        Issue Links

          Activity

            People

              dennisl@apache.org Dennis Lundberg
              jrduncans Stephen Charles Duncan, Jr.
              Votes:
              18 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m