JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
The metric search language provides fine-grained control over the component search dimension of metric reports.
For searches within the scope of a focal analysis, the component search covers procedures, file instances, and compilation units. For searches in broader scopes, the component search covers only file instances and compilation units.
For searches within the scope of a focal analysis, the component search covers procedures, file instances, and compilation units. The procedures present in results will depend on procedure information availability.
For searches in broader scopes, the component search covers only file instances and compilation units.
The metric search language grammar is based on the standard CodeSonar search grammar, with domain-specific field-name values as described below. Literal strings are displayed in pink text.
field-name : adesc | aid | analysis | directory | file | language | path | pdesc | pid | procedure | project | ptree_path | sql
With the exception of procedure (which is only for procedures) and sql (which is only for files and compilation units), the field-names in the metric search language refer to properties of a source file and are applied to all three component types as shown in the following table.
| for component... | ...file-related field-names are applied to... |
|---|---|
| Procedure | The Procedure File. |
| File | The representative instance of the file. |
| Compilation Unit | The root instance of the compilation unit. |
The following table shows the relationship between the metric-specific field-name values and the properties of procedures and files. It also shows the expected condition types for the resulting field-conditions.
word and quoted-string search terms are treated as follows.
str is equivalent to aid:str | analysis:str | directory:str | file:str | language:str | path:str | pid:str | project:str
str is equivalent to procedure:str
The following table shows simple example queries using field-names from the metric search language.
| example | explanation |
|---|---|
| main | Find procedures whose name contains (case-sensitive) substring main; and files and compilation units that have (case-insensitive) substring main in any field. |
| adesc:stable | Find files and compilation units belonging to analyses whose description contains the (case-insensitive) substring stable. |
| aid=8 | Find files and compilation units from the analysis with this Analysis ID. |
| analysis="tms analysis 5" | Find files and compilation units from the analysis with this name. |
| directory:module | Find files in any directory whose path (case-insensitively) includes substring module, procedures defined in these files, and compilation units whose root instance is one of these files. |
| file:signal | Find files whose basename contains (case-insensitive) substring signal, procedures defined in these files, and compilation units whose root instance is one of these files. |
| language=C | Find files whose language is C (not C++), procedures defined in these files, and compilation units whose root instance is one of these files. |
| path=/tmp/foo.c | Find files with the (case-insensitive) absolute name /tmp/foo.c, procedures defined in these files, and compilation units whose root instance is one of these files. |
| pdesc="thingy management system" | Find files and compilation units belonging to analyses of projects with this description (case-insensitively). |
| pid=2 | Find files and compilation units belonging to analyses of the project with Project ID 2. |
| procedure:_handler | Find procedures whose name contains (case-sensitive) substring _handler. |
| project=tms | Find files and compilation units belonging to analyses of the project named tms (case-insensitively). |
| ptree_path:/TreeX/TreeA |
Find files and compilation units belonging to
analyses of:
|
The sql field-name is provided to allow extra search customization in searches for files and compilation units, but is not supported. It is only available to users with G_SQL_CONSOLE permission.
See File Search Language: SQL Terms for further details.
To report problems with this documentation, please visit https://support.codesecure.com/.