How To Search Code Metrics Calculation Result

FxCop Integrator supports the search feature to find out specific metrics values by simple search words.

Basic Search

When you input any text to search box and press enter key (or click search button), FxCop Integrator will search metrics values that contain the specified search word in any column.
If you input two or more search words, FxCop Integrator will find out metrics values that contain all of them.
You can contain a white space in search word with ' or ".

Example :
  • Foo "Bar1 Bar2"

AND/OR Search and Grouping with Parenthesis

FxCop Integrator Search feature supports the logical operator AND and OR.
The default behavior is AND search.
But, if you want to specifically allow either one of several words, you can use the OR operator.

Example :
  • Foo AND Bar (This expression equals Foo Bar)
  • Foo OR Bar

FxCop Integrator also support parenthesis to group search words.

Example :
  • (Foo1 OR Foo2) AND Bar

Specific Column Search

You can search throught the specific column with a special keyword.
FxCop Integrator supports following keywords:

Keyword Description
kind (short form: k) searches through Kind column (most left column) only
name (short form: n) searches through Name column only
mi searches through MI column only
cc searches through CC column only
ccp searches through CCP column only
loc searches through LOC column only
doi searches through DOI column only
project (short form: p) searches by project name (code metrics calculation view doesn't have Project column, but it has project name internally)
assembly (short form: asm) searches by assembly path (code metrics calculation view doesn't have Assembly column, but it has assembly path internally)
namespace (short form: ns) searches by namespace (code metrics calculation view doesn't have Namespace column, but it has namespace internally)
type (short form: t) searches by type name (code metrics calculation view doesn't have Type column, but it has type name internally)
signature (short form: sig) searches by signature of member (code metrics calculation view doesn't have Signature column, but it has signature internally)


Example :
  • n:Foo AND asm:Bar
  • (name:Foo1 OR name:Foo2) AND project:Bar

kind (k)

You can show only specific kind of metrics values with kind keyword.
FxCop Integrator supports following kinds:
  • module
  • namespace
  • type
  • member

Example :
  • kind = 'member'
  • k = 'module' or k = 'namespace' or k = 'type'

Note that you have to quote a right-hand operand with single quotation.

Operator

You can use following operators.

Operator Description
= Equal operator
> Greater than operator
>= Greater than or equal operator
< Less than operator
<= Less than or equal operator
: Partial matching
=: Prefix searching
:= Suffix searching


Example :
  • mi<50
  • loc < 100 AND cc > 20
  • 10 < cc < 20

Last edited Dec 26, 2011 at 12:11 PM by sasaminn, version 4

Comments

herbjorn Jan 2, 2012 at 12:51 PM 
Great! Thanks

sasaminn Dec 26, 2011 at 12:00 PM 
You can show only members with the search string kind='member'.

herbjorn Dec 23, 2011 at 12:54 PM 
Can I use a search to filter out code metrics for methods, e.g. not show classes or namespaces?