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

Add option to exclude generated sources/test-sources from default source/test-source directories

    XMLWordPrintableJSON

Details

    Description

      The default value of parameter `sourceDirectories` isĀ  `${project.compileSourceRoots}`, which includes generated sources. And for `testSourceDirectories` is `${project.testCompileSourceRoots}` which includes generated test sources.

      The major usage of checkstyle is to enforce rules on human written codes and docs. The generated ones commonly come from third-party templates or scripts, and they probably do not meet user defined checkstyle rules.

      We can bravely conclude exclude the generated sources / test sources directories and the impact should be trivial, although it is a breaking change.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              gmshake Zhenlei Huang
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: