scitools.com

← Metric catalog

CodeCheck Violation Types is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

CodeCheck Violation Types

API ID: CountCCViolType
Languages: Any
Targets: Architectures, Files, Functions, Project

The number of distinct violation types (distinct check ids)

For example, if the violation browser for a file showed these violations:

The violation check ids are CPP_WARN_RETURN_TYPE, STI_UNUSED, STI_UNUSED, and UND_ERROR. UND_ERROR is an analysis error and not part of CodeCheck, so the value of this metric is 2 for CPP_WARN_RETURN_TYPE and STI_UNUSED.

See also CountAnalysisError for a count of analysis errors and CountAnalysisWarning for a count of analysis warnings.