You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/01/09 01:05:58 UTC
[hbase] branch branch-2.4 updated: HBASE-25333 Add maven enforcer
rule to ban VisibleForTesting imports (#2854)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new 75f5cb2 HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports (#2854)
75f5cb2 is described below
commit 75f5cb2450b02f832a78841583c4a854fc4db585
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sat Jan 9 08:50:11 2021 +0800
HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports (#2854)
Signed-off-by: Peter Somogyi <ps...@apache.org>
---
pom.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/pom.xml b/pom.xml
index bfb5e1b..734d9e4 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1145,6 +1145,19 @@
<bannedImport>org.glassfish.jersey.**</bannedImport>
</bannedImports>
</restrictImports>
+ <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
+ <includeTestCode>true</includeTestCode>
+ <commentLineBufferSize>512</commentLineBufferSize>
+ <reason>
+ You should never use this style of annotations(i.e, 'this is for test only')
+ in IA.Public or IA.LimitedPrivate classes. Use IA.Private to tell users this is
+ not for public use.
+ For IA.Private classes, use RestrictedApi annotation in error prone instead.
+ </reason>
+ <bannedImports>
+ <bannedImport>org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting</bannedImport>
+ </bannedImports>
+ </restrictImports>
</rules>
</configuration>
</execution>