HADOOP-18027. Include static imports in the maven plugin rules (#3733)

Reviewed-by: Steve Loughran <stevel@apache.org>
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
This commit is contained in:
Viraj Jasani 2021-12-01 13:18:43 +05:30 committed by GitHub
parent 1ebdac2cd6
commit 4dea4a7b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
pom.xml
View File

@ -182,6 +182,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use hadoop-thirdparty shaded instead of curator shaded</reason>
<bannedImports>
<bannedImport>org.apache.curator.shaded.**</bannedImport>
<bannedImport>static org.apache.curator.shaded.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -189,6 +190,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use hadoop-common provided Sets rather than Guava provided Sets</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Sets</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.Sets.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -196,6 +198,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use hadoop-common provided Lists rather than Guava provided Lists</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Lists</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.Lists.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -210,6 +213,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternatives to Guava common classes</reason>
<bannedImports>
<bannedImport>com.google.common.**</bannedImport>
<bannedImport>static com.google.common.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -217,6 +221,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided BaseEncoding</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -224,6 +229,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided Optional</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Optional</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Optional.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -231,6 +237,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided Function</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Function</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Function.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -238,6 +245,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided Predicate</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Predicate</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Predicate.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -245,6 +253,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided Supplier</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Supplier</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Supplier.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@ -252,6 +261,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<reason>Use alternative to Guava provided ImmutableListMultimap</reason>
<bannedImports>
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap</bannedImport>
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">