Generic File Queries

A generic file query is a powerful mechanism for locating files that match the criteria you specify. All the ready-made file queries that CScout provides you are just URLs specifying saved instances of generic queries.

You specify the query through the following form:

File Query

Writable
Read-only
Sort-byMetricCompareValue
Number of characters
Comment characters
Space characters
Number of line comments
Number of block comments
Number of lines
Length of longest line
Number of C strings
Number of unprocessed lines
Number of defined functions
Number of preprocessor directives
Number of directly included files
Number of C statements
File name

Reverse sort order

Match any of the above         Match all of the above


File names should match RE

Query title   

Main page - Web: Home Manual


CScout 2.0 - 2004/07/31 12:37:12

You start by specifying whether the file should be writable (i.e. typically part of your application) and/or readable (i.e. typically part of the compiler or system). Next come a series of metrics CScout collects for each file. For each metric (e.g. the number of comments) you can specify an operator ==, !=, < or > and a number to match that metric against. Thus to locate files without any comments you would specify
Number of block comments == 0.

On the right of each metric you can specify whether that metric will be used to sort the resulting file list. In that case, the corresponding number will appear together with each file listed. A separate option allows you to specify that files should be sorted in the reverse order.

You can request to see files matching any of your specifications (Match any of the above) or to see files matching all your specifications (Match all of the above).

Sometimes you may only want to search in a subset of files; you can then specify a regular expression that filenames should match against (File names should match RE).

Finally, you can also specify a title for your query. The title will then appear on the result document annotating the results, and will also provide you with a sensible name when creating a bookmark to it.