[ checkstyle-Patches-3515915 ] New check: ForbidsCertainImportsCheck

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ checkstyle-Patches-3515915 ] New check: ForbidsCertainImportsCheck

SourceForge.net
Patches item #3515915, was opened at 2012-04-08 11:09
Message generated for change (Comment added) made by oburn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=3515915&group_id=29721

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.
Category: None
Group: None
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Daniil Yaroslavtsev (daniilyar)
Assigned to: Nobody/Anonymous (nobody)
Summary: New check: ForbidsCertainImportsCheck

Initial Comment:
This check forbids certain imports usage in class. Idea was taken from the similar check in Sonar project.

Parameters:

Package regexp;
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.

Made in accordance with this issue:
https://sourceforge.net/tracker/?func=detail&aid=3413148&group_id=29721&atid=397081


----------------------------------------------------------------------

>Comment By: Oliver Burn (oburn)
Date: 2012-04-16 03:48

Message:
Does the ImportControl check
(http://checkstyle.sourceforge.net/config_imports.html#ImportControl) not
already meet these requirements?

If not, please give a concrete example of where it does not.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=3515915&group_id=29721

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Checkstyle-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel