skuzzle / restrict-imports-enforcer-rule

Gradle plugin & Maven Enforcer rule that restricts usage of unwanted imports in Java, Kotlin and Groovy source files.
MIT License
75 stars 12 forks source link

Add support for fully qualified names for annotations #79

Closed yeikel closed 1 year ago

yeikel commented 1 year ago

I understand that the goal of this library is to support imports exclusively, but would this request fall under this project or should I look for other solutions?

Example

 @com.couchbase.client.core.deps.com.google.common.annotations.VisibleForTesting
private DataAccessFactory() {

This only works if it is is imported explicitly.

import com.couchbase.client.core.deps.com.google.common.annotations.VisibleForTesting

skuzzle commented 1 year ago

Good find. This should be fairly easy to implement given that we already have support for full qualified class usage since #57 It is just a special case that is currently not covered. I'll have a look into this tomorrow.

This would also be a good issue for a first contribution 😉