Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

This coding rule is only available for .Net and Java projects.

Note that compiled code must be available.


  • forbid access to *.web.* from *.dao.* classes
  • forbid access to java.util.Vector, java.util.Hashtable and java.util.Enumeration from any classesclass
  • forbid access to java.sql.* from *.ui.* and **.web.* classes

An The Architectural constraint rule template, provided by the Sonar rule engine, allows you to define as many architectural constraints constraint rules as desired:

Image Removed
The architectural constraint should be considered as a rule template and should not be directly activated. Let's say for instance that you want to forbid use of java.sql package by all your projects. In that case, you must first Copy the Architectural constraint rule to create and share your own specialized architectural constraint:

Image Removed
Image Removed
Image Added
When creating a custom rule based on this architectural rule template, you must specify the access constraints:

Image Added
Your newly created rule can now be used and activated in any desired quality profile:
Image RemovedImage Added