CQM-ViolationCounts¶
Violation counts of metrics and stylechecks
Counts and reports the number of violations for each rule listed in counted_rules as system metrics. The values of this metric are not stored in the RFG and violations cannot be suppressed/justified.Note: The Option Results.Dashboard.advanced.import_only_first_style_violation_per_line can affect the results of this metric, since the violations already counted by this metric could be removed before being imported into the database and subsequently the dashboard and plugins.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: severity
This rule shares the following common metric options: report_all_values
The following places define options that affect this rule: Analysis-GlobalOptions
append_error_number_to_metric_name¶
append_error_number_to_metric_name : bool = True
append_rule_names_to_metric_name¶
append_rule_names_to_metric_name : bool = True
counted_rules (if present at
the rule) should be appended to the metric name.
count_suppressed_issues¶
count_suppressed_issues : bool = False
counted_rules¶
counted_rules
Set with the rule names (error numbers) or glob patterns of the rules whose violations are to be counted.Type: set[bauhaus.analysis.config.GlobPattern]
Default:
{'CQM-ClassIncest', 'CQM-Classlet', 'CQM-ConstantsRain', 'CQM-DataCapsuleBreakUp', 'CQM-DeadFields', 'CQM-DeadImplementation', 'CQM-DeadRoutines', 'CQM-GeneralParameter', 'CQM-GenerationalConflict', 'CQM-GodClassMember', 'CQM-GodClassRoutine', 'CQM-GodFile', 'CQM-GodNamespace', 'CQM-GodRoutine', 'CQM-HalfHeartedOperation', 'CQM-IdentitySplit', 'CQM-IncludeChaos', 'CQM-IncludeLie', 'CQM-IncompleteInheritanceField', 'CQM-IncompleteInheritanceRoutine', 'CQM-IncorrectNameLength', 'CQM-IncorrectNameLengthFile', 'CQM-InformalDocumentation', 'CQM-LabyrinthRoutine', 'CQM-LateAbstraction', 'CQM-LongParameterList', 'CQM-MaskingFile', 'CQM-MemberHiding', 'CQM-NamespaceHierarchyBreakUp', 'CQM-Namespacelet', 'CQM-ObjectPlaceboMember', 'CQM-ObjectPlaceboRoutine', 'CQM-OverbookedFile', 'CQM-PolymorphismPlacebo', 'CQM-PotentialPrivacyMember', 'CQM-PotentialPrivacyRoutine', 'CQM-RejectedInheritanceImplementation', 'CQM-RejectedInheritanceInterface', 'CQM-RiskyCode', 'CQM-SecretRelation', 'CQM-SignatureLikeClasses', 'CQM-SimulatedPolymorphism'}
display_name¶
display_name : str | None = 'Number of violations of rule: '
counted_rules (if present at the rule) appended to it, if
sum_up_violations is false.
If unset, metric_name is used.
max_value¶
max_value : int = 0
metric_name¶
metric_name : str = 'Metric'
counted_rules (if present at the rule)
added at the end.
min_value¶
min_value : int = 0
sum_up_violations¶
sum_up_violations : bool = False