[
https://issues.apache.org/jira/browse/HADOOP-17513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17281886#comment-17281886
]
Jim Brennan commented on HADOOP-17513:
--------------------------------------
{quote}
Personally, I will prefer that the build breaks locally rather than injecting
automatic code changes.
{quote}
I would prefer it break the build as well, but I am not sure that is possible?
The current approach is OK with me if it is not feasible to break the build.
In the ideal case, people making a change that causes this to happen will
notice it and not submit a patch with the wrong imports. In the case where
someone fails to include the import fix in their patch, someone else will
likely notice and alert them to fix it, as happened in this case.
I admit to being surprised when I saw this was happening, and a little alarmed
that a build would modify a source file, but I think I understand why it was
done this way.
> Checkstyle IllegalImport does not catch guava imports
> -----------------------------------------------------
>
> Key: HADOOP-17513
> URL: https://issues.apache.org/jira/browse/HADOOP-17513
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Ahmed Hussein
> Assignee: Ahmed Hussein
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Although YARN-10352 introduces {{guava iterator import}}, it was committed to
> trunk without checkstyle errors.
> According to [IllegalImportCheck#setIllegalPkgs
> |https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java],
> the packages regex should be the prefix of the package. The code
> automatically append {{\.*}} to the regex.
> CC: [~aajisaka]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]