HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports (#2854)
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
parent
09db88d3ba
commit
75f5cb2450
13
pom.xml
13
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>
|
||||
|
|
Loading…
Reference in New Issue