6.2.2. Common Options¶
Most rules have these options, so they are documented here for brevity.
6.2.2.1. exclude_in_macros¶
exclude_in_macros : set[bauhaus.analysis.config.GlobPattern] = set()
6.2.2.2. exclude_messages_in_system_headers¶
exclude_messages_in_system_headers : bool | None = None
If this option is not set, the option defaults to true,
except when axivion_analysis is called with the
--system_headers command-line argument.
In axivion_ci, this option always defaults to true.
If this option is set, the axivion_analysis --system_headers
command-line argument will have no effect.
System headers are the header files that are found in the system include path.
#pragma GCC system_header also causes files to be classified as
system header.
6.2.2.3. excludes¶
excludes : set[bauhaus.analysis.config.FileGlobPattern] = set()
Note that excludes can also be specified via the option /Analysis/global_excludes or via the `axivion_analysis --exclude` command-line option.
If both includes and excludes are used,
the rule applies to all files that match at least one include pattern, and do not
match any exclude patterns.
6.2.2.4. extend_exclude_to_macro_invocations¶
extend_exclude_to_macro_invocations : bool = False
Note: violations reported inside the macro definition itself (e.g. if
report_at is set to automatic) are always
excluded, independently of this option.
6.2.2.5. includes¶
includes : set[bauhaus.analysis.config.FileGlobPattern] = set()
If both includes and excludes are used,
the rule applies to all files that match at least one include pattern, and do not
match any exclude patterns.
6.2.2.6. justification_checker¶
justification_checker
Can be set to a callable taking (and possibly modifying) a style violation instance. Will be called per issue and can be used to check a disabled issue's justification, for example, against permitted ones.Type: typing.Callable[[typing.Union[analysis_result_pb2.Architecture_Violation, analysis_result_pb2.Clone_Pair, analysis_result_pb2.Cycle_Finding, analysis_result_pb2.Dead_Entity, analysis_result_pb2.Metric, analysis_result_pb2.Style_Violation]], NoneType] | None
Default:
None
Note: use the post_processing option for a more general method of filtering/modifying violations produced by this rule.
6.2.2.7. languages¶
languages : set[Language] = {'Assembler', 'C#', 'C', 'C++', 'C++/CLI'}
6.2.2.8. post_processing¶
post_processing : bauhaus.analysis.post_processing.PostProcessingSettings = <PostProcessingSettings(0 filters)>
See the documentation of module axivion.analysis.post_processing for
more information.
6.2.2.9. provider¶
provider : str = 'axivion'
6.2.2.10. report_at¶
report_at : MacroViolationPosition = 'automatic'
Note: Reporting violations at the macro definition will cause violations to be excluded if the macro is defined in an excluded file (e.g. system header).
6.2.2.11. severity¶
severity : str = 'error'
6.2.3. Option Types¶
These types are used by options listed above:
6.2.3.1. Language¶
IR languages, used for language filter.C
C++
C#
C++/CLI
Assembler
Rust
6.2.3.2. MacroViolationPosition¶
An enumeration.automatic
Automatically determine whether to report a violation at the macro invocation or definition. By the default this will report at the macro invocation, but some rules have special logic to report the violation in macro definitions when appropriate (usually when the violation is independent of the macro arguments).macro_invocation
Always report violations at macro invocation.macro_definition
Always report violations at the macro definition, even if the violation might depend on macro arguments.