[
https://issues.apache.org/jira/browse/MCHECKSTYLE-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17725300#comment-17725300
]
ASF GitHub Bot commented on MCHECKSTYLE-412:
--------------------------------------------
gmshake commented on code in PR #76:
URL:
https://github.com/apache/maven-checkstyle-plugin/pull/76#discussion_r1201858564
##########
src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java:
##########
@@ -427,6 +428,14 @@ public abstract class AbstractCheckstyleReport extends
AbstractMavenReport {
+ "
\"https://checkstyle.org/dtds/configuration_1_3.dtd\">\n")
private String checkstyleRulesHeader;
+ /**
+ * Specifies whether generated source files should be excluded for
Checkstyle.
Review Comment:
Done
> 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.10#820010)