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 <reason> option to output the reason of why the imports are banned #11

Closed skuzzle closed 7 years ago

skuzzle commented 7 years ago

Add <reason> tag that will be printed in case banned imports have been found. Tag should be optional.

skuzzle commented 7 years ago

Example:

<restrictImports implementation="de.skuzzle.enforcer.restrictimports.RestrictImports">
    <reason>Use slf4j instead of java loggers</reason>
    <bannedImports>
        <bannedImport>java.util.logging.**</bannedImport>
    </bannedImports>
</restrictImports>

to be released in 0.8.0