Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Daniil Yaroslavtsev (daniilyar)
Assigned to: Nobody/Anonymous (nobody)
Summary: New check: ForbidsCertainImportsCheck
This check forbids certain imports usage in class. Idea was taken from the similar check in Sonar project.
Forbidden imports regexp.
Check operates with packages/imports text in string representation without "package"/"import" words and semicolons. You can be sure to write any regular expressions for package/imports text filtering.
Example of usage: Forbid to use "*.ui.*" packages in "*.dao.*" packages:
Package name regexp = ".+.ui..+"
Forbidden imports regexp = ".+.dao..+"
By means of few instances of this check will be possible to check any number of rules.