Skip to content

Commit d0e1802

Browse files
committed
HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports
1 parent 45ef88d commit d0e1802

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,19 @@
13411341
<bannedImport>org.glassfish.jersey.**</bannedImport>
13421342
</bannedImports>
13431343
</restrictImports>
1344+
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
1345+
<includeTestCode>true</includeTestCode>
1346+
<commentLineBufferSize>512</commentLineBufferSize>
1347+
<reason>
1348+
You should never use this style of annotations(i.e, 'this is for test only')
1349+
in IA.Public or IA.LimitedPrivate classes. Use IA.Private to tell users this is
1350+
not for public use.
1351+
For IA.Private classes, use RestrictedApi annotation in error prone instead.
1352+
</reason>
1353+
<bannedImports>
1354+
<bannedImport>org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting</bannedImport>
1355+
</bannedImports>
1356+
</restrictImports>
13441357
</rules>
13451358
</configuration>
13461359
</execution>

0 commit comments

Comments
 (0)