Skip to content

HIS (Hersteller-Initiative Software) metrics

HISHersteller-Initiative Software — is a set of source-code metrics defined by a consortium of German automotive manufacturers to constrain per-function complexity, coupling, and structure. Understand ships the full HIS set and can report it three ways. See also the Solution: HIS Metrics plugin-library page for metric-by-metric footnotes — e.g. exactly what RETURN counts, and which rows aren't on the published HIS list.

The HIS metric set

Each HIS metric maps to an Understand metric ID and carries a default limit. Understand's shipped defaults are shown below.

Acronym Metric Understand ID Default limit
COMF Comment density RatioCommentsWithBeforeToCode ≥ 20 %
PATH Number of paths CountPath ≤ 80
GOTO Number of goto statements CountGoTo ≤ 0
v(G) Cyclomatic complexity CyclomaticModified (default; variant selectable) ≤ 20
CALLING Number of calling functions CountCallbyUnique ≤ 5
CALLS Number of called functions CountCallsUnique ≤ 7
PARAM Number of parameters CountParams ≤ 5
STMT Number of instructions CountStmt ≤ 50
LEVEL Number of call levels MaxCallDepth ≤ 4
RETURN Number of return points CountEarlyExit ≤ 0 extra exits
VOCF Language scope LanguageScope ≤ 4
NOMV MISRA-HIS subset violations HISNOMV ≤ 0
AP_CG_CYCLE Recursions IsRecursive ≤ 0
SCHG / SDEL / SNEW Statements changed / deleted / new CountLineChanged / CountLineRemoved / CountLineNew ≤ 100 per file / ≤ 500 project-wide
S Stability index StabilityIndex ≥ 50 %

Understand's default v(G) limit is 20, not the 1–10 range HIS recommends

emenda.com/his — the HIS reference Understand's own HIS plugins link to — gives v(G) a recommended range of 1–10. Understand ships a default limit of 20 for the v(G) check instead (measured with the Modified Cyclomatic variant by default — the variant is a check option). Most limits above are configurable options — set them to whatever your project's standard mandates before you rely on the pass/fail results. The zero-tolerance rows (GOTO, RETURN, AP_CG_CYCLE, NOMV) have no threshold option: any occurrence is a violation. See What does Cyclomatic Complexity mean?.

Metric IDs vs. what the checks compute

The Understand IDs above are what the HIS Metrics interactive report and the hisMetricsCsv.py script query. Several of the CodeCheck implementations compute the same value directly (from references, the control-flow graph, or their own lexer pass) rather than reading the named metric, so a check result and a metric column can differ slightly at edge cases. The RETURN check applies to C++ only.

The table's 15 rows cover 17 of the standard's 18 checks (SCHG/SDEL/SNEW share a row); the 18th, NOMVPR (MISRA-HIS violations per rule), has no standalone metric. Both NOMV and NOMVPR depend on the separate MISRA HIS Subset CodeCheck configuration running as well.

Three ways to run HIS

The original and most complete path is the published CodeCheck standard Hersteller Initiative Software (HIS) Metrics (18 checks). Open Checks → Select Checks, choose that configuration, and run it. Violations appear like any other CodeCheck result — sortable, suppressible, and exportable to a compliance report.

See Which standard should I check against?, Run your first check, and Produce a compliance report.

The HIS Metrics interactive report shows every HIS result — not only the violations. Run it on a single function to see that function's metrics, or on a file, architecture, or the whole project to get a table with one row per function and the HIS metrics as columns. Launch it from Project → Interactive Reports → HIS Metrics, from the HIS tile on the project overview, or via und report "HIS Metrics". See Export & script reports.

A shipped script exports the full HIS suite (all results, with an asterisk marking violations) to CSV for every function:

upython plugins/Scripts/Python/hisMetricsCsv.py myProject/myProject.und
upython plugins/Scripts/Python/hisMetricsCsv.py myProject/myProject.und -csv myReport.csv

Each CSV row has the parent, file, line, function name, and the HIS metrics; the default output is <project>-<timestamp>.csv. All limits are command-line options (see -h) or editable at the top of the script, so you can pin the thresholds to your standard. Analyze the project first (Project → Analyze Changed Files, Ctrl+R).

Which one should I use?

Use the CodeCheck standard for compliance and CI gating (it integrates with baselines, suppression, and reports). Use the interactive report or CSV script when you want the raw numbers for every function, not just the failures.