Skip to content

Commit

Permalink
HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports (#…
Browse files Browse the repository at this point in the history
…2854)

Signed-off-by: Peter Somogyi <[email protected]>
  • Loading branch information
Apache9 authored Jan 9, 2021
1 parent 54eae0f commit 4925a64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,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>
Expand Down

0 comments on commit 4925a64

Please sign in to comment.