CQM-NamingErrorPR

Number of CodingStyle-Naming violations, per rule

Counts the number of violations found by the rules specified in rules. Violations are reported separately for each rule.

Motivation

Naming conventions are easy-to-establish »game rules« that help to establish a uniform expectation towards the artefacts. Some rules also help to avoid character set specific problems in advance (e.g when using ö,ä or ß).

This rule is based on the CQM Quality Indicator: Namensfehler (p. 249-252).

Reference

Simon, Frank/ Seng, Olaf/ Mohaupt, Thomas (2006): Code-Quality-Management: Technische Qualität industrieller Softwaresysteme transparent und vergleichbar gemacht, 1st ed., Heidelberg, Germany: dpunkt.verlag GmbH.

Possible Messages

This rule has no predefined messages.

Options

append_error_number_to_metric_name

append_error_number_to_metric_name : bool = False

Whether the error number of this metric should be appended to the metric name.
 

append_rule_names_to_metric_name

append_rule_names_to_metric_name : bool = True

Sets whether the rule names from option counted_rules (if present at the rule) should be appended to the metric name.
 

count_suppressed_issues

count_suppressed_issues : bool = False

Whether suppressed issues should be counted.
 

display_name

display_name : str | None = 'Number of CodingStyle-Naming violations of rule: '

Description of the metric shown in the dashboard. With the rule name matched with option 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

Maximum allowed value.
 

metric_name

metric_name : str = 'Metric.NamingError'

Name of the metric shown in the dashboard. With the name of this rule and the name from the rule from option counted_rules (if present at the rule) added at the end.
 

min_value

min_value : int = 0

Minimum allowed value.
 

rules

rules : set[bauhaus.analysis.config.GlobPattern] = {'CodingStyle-Naming.*'}

Set with the rule names (error numbers) or glob patterns of the rules whose violations are to be counted.
 

sum_up_violations

sum_up_violations : bool = False

Whether to sum up violations of all counted rules and report them as a single metric, or for each rule individually. If false, the rule name gets appended to the display_name.