Metric models

Required role  Rule Management
Access  CodeChecker Server Rules Configuration →  Metric Models

Metric models are script instructions used to create metrics and analyze an application's source code. A metric model defines the actions to carry out to retrieve a value when analyzing code. A metric model uses properties. When the metric using a metric model is instantiated for a quality rule, values for each of the properties are defined to conform to the specific rule’s context.

Example

You want to create a quality rule to make sure the word 'TODO' is not found in the source code or the comments. The metric used in the quality rule needs to find the occurrences of this word.

To create the required metric, you will need to use the SEARCH_WORD metric model and define the correct properties when you instantiate the metric.

ARCAD CodeChecker comes with a set of standard, ready-to-use, non-editable metric models. However, ARCAD CodeChecker also allows you to create metric models using the Groovy scripting language.

Reference

For more information about the Groovy programming language, refer to the Groovy documentation.

Reference

For more information about metrics, refer to Metrics.

For more information about quality rules, refer to Quality rules.

Metric models

The  Metric Models view is accessed from the  Configuration node in the Navigator.

The standard metric models supplied by ARCAD CodeChecker are highlighted to be easily identified.

Enter any combination of the above search criteria, then click the Search button to display the results. To display the complete list, click the Search button without entering any search criteria.