Module based on object path,shows objects other than the defined object path
In some cases, we may find objects in module based on object path including objects from path not part of the one defined in the module.
This is because some objects may be child objects. CAST recommends using object filters based on Analysis Units rather than on the object full path to avoid having violations returned for child objects that are not specifically part of the object filter.
Take the following example. If the object filter is based on the object full path, for instance SomeCode\NextCode\Comments\src, it will retrieve the file comment1.cs and its children, and children of these children etc. In this situation, we can expect that the Namespace viewComment and objects of the class comment1 to be part of the module. However, since we have matched the namespace viewComment (a child of the comment1.cs file), the class comment2 will also be part of the module as it is a child of the namespace.
Please sign in to leave a comment.