scitools.com

← All und commands

und is the command-line interface to Understand — script project creation, analysis, CodeCheck, metrics, and reports, locally or in CI.

und metrics

generates project metrics

Export metrics in CSV format for entities in the project

Output File

The output file name is required. So, a minimum command is:

und metrics output.csv myProject.und

Metrics

By default, all enabled metrics applicable to the current project are exported. You can set a specific metric list (including metrics that are not enabled) with the -metrics switch and providing the metric ids in the desired order. List file syntax (@file.txt with one metric id per line) is supported. For example:

und metrics -metrics CountLine CountLineCode output.csv myProject.und
und metrics -metrics @myMetrics.txt output.csv myProject.und

To discover metrics, use docs.scitools.com/metrics or from the Understand GUI use "Metrics->Configure Metrics".

Additional Options

Other options are set with the -options switch, using the same format as reports: a semicolon separated list of name=value pairs, given as a single quoted string. The available options and their defaults are:

Write Column Titles=true (true|false)
Include Entity Unique Name to track changes over time=false (true|false)
Show Function Parameter Types=false (true|false)
Show Declared In File=None (None|Short Name|Long Name|Relative Name)
File Name Format=Short Name (Short Name|Long Name|Relative Name)

An example setting multiple options is:

und metrics -options "Write Column Titles=false;File Name Format=Long Name" output.csv myProject.und