Maven Checkstyle Plugin
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-144

If 'src/main/java' does not exist in a project then checkstyle skips the other source folders of the project

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.10
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I'm not sure whether this is related to MCHECKSTYLE-141.

      If I check a test-project that contains only a folder src/test/java but not a folder src/main/java (even thoud the includeTestDir option is set) then checkstyle ignores the whole project:

      [INFO] — maven-checkstyle-plugin:2.5:checkstyle (default-cli) @ de.faktorlogik.core.tests —
      [INFO] Source directory does not exist - skipping report.
      [INFO] ------------------------------------------------------------------------

        Issue Links

          Activity

          Hide
          Ulli Hafner added a comment -

          Version: 2.5

          Show
          Ulli Hafner added a comment - Version: 2.5
          Hide
          Dennis Lundberg added a comment -

          I have just applied 2 patches that could help solve this issue.
          Can you please try 2.7-SNAPSHOT and see if i works for you?

          Show
          Dennis Lundberg added a comment - I have just applied 2 patches that could help solve this issue. Can you please try 2.7-SNAPSHOT and see if i works for you?
          Hide
          Lukas Fryc added a comment -

          Hi Dennis, I have ran into same issue and tried to use 2.7-SNAPSHOT,
          but my build has failed with "Failed during checkstyle configuration: missing key 'cacheFile' in TreeWalker -> [Help 1]
          "

          Show
          Lukas Fryc added a comment - Hi Dennis, I have ran into same issue and tried to use 2.7-SNAPSHOT, but my build has failed with "Failed during checkstyle configuration: missing key 'cacheFile' in TreeWalker -> [Help 1] "
          Hide
          Dennis Lundberg added a comment -

          Lukas,

          It sounds as if your Checkstyle configuration file is incorrect.
          Have you updated it to the changes that were made in Checkstyle 5.0?
          See http://checkstyle.sourceforge.net/releasenotes.html for details.

          Show
          Dennis Lundberg added a comment - Lukas, It sounds as if your Checkstyle configuration file is incorrect. Have you updated it to the changes that were made in Checkstyle 5.0? See http://checkstyle.sourceforge.net/releasenotes.html for details.
          Hide
          Sei Syvalta added a comment -

          > "Failed during checkstyle configuration: missing key 'cacheFile' in TreeWalker

          See http://jira.codehaus.org/browse/MCHECKSTYLE-159

          Show
          Sei Syvalta added a comment - > "Failed during checkstyle configuration: missing key 'cacheFile' in TreeWalker See http://jira.codehaus.org/browse/MCHECKSTYLE-159
          Hide
          Dennis Lundberg added a comment -

          Is this still an issue in version 2.8?

          Show
          Dennis Lundberg added a comment - Is this still an issue in version 2.8?
          Hide
          Mark Hobson added a comment -

          Yep, I've just encountered this in 2.9.1.

          Show
          Mark Hobson added a comment - Yep, I've just encountered this in 2.9.1.
          Hide
          Peter Janes added a comment -

          MCHECKSTYLE-185 (which I guess is a duplicate) also has a patch for this issue.

          Show
          Peter Janes added a comment - MCHECKSTYLE-185 (which I guess is a duplicate) also has a patch for this issue.
          Hide
          Dennis Lundberg added a comment -

          Fixed in r1438948.

          Show
          Dennis Lundberg added a comment - Fixed in r1438948 .

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Ulli Hafner
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: