6.2.5.7. Architecture-MappingSanityCheck

Mapping Sanity Check

Required inputs: RFG

Sanity checks for architecture and mapping:

  • Every source element is mapped somewhere
  • Every source element can be mapped to at most one architecture element.
  • Every architecture element is target of some mapping

Possible Messages

This rule has no predefined messages.

Options

architecture_view_name

architecture_view_name : str = 'Architecture'

Name of the architecture view to use.
 

check_architecture_elements_targeted

check_architecture_elements_targeted : bool = True

Check if the elements in the architecture view are the target of some mapping.
 

check_source_elements_mapped

check_source_elements_mapped : bool = True

Check if the source elements in the hierarchy view are mapped at least implicitly to some architecture element.
 

export_warnings

export_warnings : bool = True

Export output messages to the analysis database.
 

hierarchy_view_name

hierarchy_view_name : str = 'File'

Name of the hierarchy view to use
 

ignored_architecture_element_types

ignored_architecture_element_types : list[str] = []

Types of architecture elements considered irrelevant for this check.
 

ignored_architecture_nodes

ignored_architecture_nodes : list[str] = []

Globbing patterns of architecture elements considered irrelevant for this check. The patterns refer to the hierarchical path of a node, e.g. Model/ComponentA/ComponentB.
 

ignored_nodes_predicate

ignored_nodes_predicate : typing.Callable[[_dg.View, _dg.Node], bool] | None = None

Predicate to mark architecture / source nodes as ignored. Parameters are the view in which the node resides and the node itself. Has to return True to ignore a node and False otherwise.
 

ignored_source_element_types

ignored_source_element_types : list[str] = []

Types of source elements considered irrelevant for this check.
 

ignored_source_nodes

ignored_source_nodes : list[str] = []

Globbing patterns of source elements considered irrelevant for this check. The patterns refer to the hierarchical path of a node, e.g. Model/ComponentA/ComponentB.
 

loglevel

loglevel : LogLevel = 'WARNING'

Logging mode. WARNING only outputs errors and warnings, INFO additionally prints info messages, DEBUG additionally outputs info and debug messages.
 

mapping_view_name

mapping_view_name : str = 'Mapping'

Name of the mapping view to be created.
 

multiple_mapping_targets_view_name

multiple_mapping_targets_view_name : str | None = None

Source elements that have multiple mapping targets are added to this view.
 

raise_exception_on_error

raise_exception_on_error : bool = False

Whether to raise an exception if a mapping error is detected. This effectively fails the build / the analysis.
 

types_completely_mapped_if_all_children_mapped

types_completely_mapped_if_all_children_mapped : set[str] = set()

Types of source elements to be considered as mapped if all their children are mapped. For example, setting types_completely_mapped_if_all_children_mapped to '{"Directory"}', ensures directories are considered as mapped if all included files and sub-directories are mapped themselves.
 

unmapped_architecture_elements_view_name

unmapped_architecture_elements_view_name : str | None = None

Architecture elements that are not targeted by any mapping are added to this view.
 

unmapped_source_elements_view_name

unmapped_source_elements_view_name : str | None = None

Source elements that are not targeted by any mapping are added to this view.
 

Option Types

These types are used by options listed above:

LogLevel

An enumeration.
 
  • WARNING

  • INFO

  • DEBUG