You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Zhenlei Huang (Jira)" <ji...@apache.org> on 2022/05/12 10:24:00 UTC

[jira] [Updated] (MCHECKSTYLE-412) Exclude generated sources / test-sources from default source / test-source directories

     [ https://issues.apache.org/jira/browse/MCHECKSTYLE-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhenlei Huang updated MCHECKSTYLE-412:
--------------------------------------
    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.

  was:
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 it probably does not meet user defined checkstyle rules.

We can bravely conclude exclude the generated sources / test sources directories and the impact should be trivial.


> Exclude generated sources / test-sources from default source / test-source directories
> --------------------------------------------------------------------------------------
>
>                 Key: MCHECKSTYLE-412
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-412
>             Project: Maven Checkstyle Plugin
>          Issue Type: Improvement
>          Components: checkstyle:check, checkstyle:checkstyle
>    Affects Versions: 3.1.2
>            Reporter: Zhenlei Huang
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)