User's Guide

Filtering Source Files

File Extension Filters provide a means of naming certain files and directories to exclude from a scan. For example, when configuring source file extensions for a java scan, you may specify that you're interested in scanning all .java files. However, maybe you have various test directories within your code base that you don't need to scan. You can tell Globalyzer to ignore all these files that have test in their path name by creating a file extension filter.

The Inherited column lists the name of the Rule Set that defined the file extension filter. A value of 'No' indicates that the filter is local to the Rule Set. Local filters can be modified and/or deleted. Inherited filters can be overridden.

To disable a local file extension filter, uncheck the box.

To create a filter, select the New File Extension Filter link at the top of the page. This displays the Create File Extension Filter form, shown below.

The page contains six fields used to describe a rule: Name, Pattern, Pattern Type, Description, Help Page, and Enabled.

Use the Name field to give your filter a brief, meaningful name.

The Pattern can be a regular expression or Ant pattern. Ant patterns are very powerful in specifying matches on directory names. For example, to specify a pattern to match against any file with test in its path, you can use the Ant pattern: **/test/**.

The Pattern Type is a radio button that is either set to Regular Expression or Ant Pattern. This simply specifies the kind of pattern entered.

Use the Description field to explain why these files/directories are not being scanned.

Use the Category field to set a category that can be enabled or disabled in bulk for a ruleset.

The Help Page field is where you can provide a URL link for the filter. This link may provide more information on the filter.

The Enabled field determines whether the filter is processed by Globalyzer (checked) or ignored by Globalyzer for now (unchecked).

Once you've provided the file extension filter information, click the Create button. The Edit File Extension Filters list redisplays, showing your changes.

If a file extension filter is local to the Rule Set, it can be modified and/or deleted. Click on its name hyperlink from the Edit File Extension Filters list. This displays the Edit File Extension Filter page, shown below. All fields are modifiable. Press Update to save any changes. Press Delete to delete the filter. After updating or deleting, the Edit File Extension Filters list redisplays, showing your changes.

If a file extension filter is inherited, it can be overridden. Maybe you want to disable the inherited filter in your Rule Set. Click on its name hyperlink from the Edit File Extension Filters list. This displays the Override File Extension Filter page, shown below. All fields are modifiable, but if you change the pattern field, you will end up creating an entirely new filter, rather than overriding the inherited one. Press Create to create the override file extension filter. After creating, the Edit File Extension Filters list redisplays, showing your local filter.

To return to the Configuring Rule Sets page, select the Back to Summary link.

 Configuring Rule Sets