HADOOP-17968 Migrate checkstyle module illegalimport to maven enforcer banned-illegal-imports#3584
Conversation
…r banned-illegal-imports
|
Could you please take a look @amahussein @tasanuma? |
| <bannedImports> | ||
| <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap</bannedImport> | ||
| </bannedImports> | ||
| </restrictImports> |
There was a problem hiding this comment.
Don't we need to keep "sun" packages? it is in the checkstyle illegal-imports
There was a problem hiding this comment.
Shall we take this separately because sun packages are already in use? Classes already in use are:
sun.misc.Unsafe
sun.misc.Signal
sun.misc.SignalHandler
sun.net.spi.nameservice.NameService
There was a problem hiding this comment.
I see!
I think that if the jira is to migrate "guava packages" then we may keep checkstyle.illegal-import entry for sun packages?
Otherwise, if the purpose to remove checkstyle illegal-imports all together, then we can exclude those classes. there is also a flag failBuild if we don't want the build to fail with some patterns.
WDYT?
There was a problem hiding this comment.
I see! I think that if the jira is to migrate "guava packages" then we may keep
checkstyle.illegal-importentry forsun packages?
Sounds good, let me put back sun packages.
There was a problem hiding this comment.
I will wait for the yetus report then merge.
amahussein
left a comment
There was a problem hiding this comment.
Thanks @virajjasani for the changes.
+1
|
Since it added |
|
Could you match the format of the text in the reason tags with other reason tags? |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Done, thanks @tasanuma |
|
@amahussein @tasanuma JFYI, the builds take almost 24 hr time (some builds timed out as well) since the change is done in hadoop-main pom. |
|
@virajjasani Thanks for updating it. +1, pending CI. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Thanks for your contribution, @virajjasani. Thanks for your review, @amahussein. |
…r banned-illegal-imports (apache#3584) Reviewed-by: Ahmed Hussein <ahussein@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
Description of PR
As discussed on PR #3503, we should migrate existing imports provided in IllegalImport tag in checkstyle.xml to maven-enforcer-plugin's banned-illegal-imports enforcer rule so that build never succeeds in the presence of any of the illegal imports.
For code changes: