|
|
Filtering Out StringsThe string filters allow you to remove "false positives" from your code scan. Specifically, this category of filter rules tells Globalyzer that if an embedded string is detected and it contains one of the selected regular expressions, ignore it; it doesn't need to be externalized so it shouldn't be listed as an error in the errors table or summary reports. The string filters configuration page allows you to create regular expressions that Globalyzer will search for inside each string literal that it detects in your source code. If any of the selected patterns are found within a detected string, that string will be excluded from the errors reports.
To deselect a string filter, uncheck the box and click the Save button at the bottom of the page. To edit an existing string filter, click on its Filter Pattern hyperlink. To add a customized string filter, click the Add New button at the bottom of the page. In either case, the Add/Edit String Filter page displays.
The Add/Edit page that displays contains three fields that are used to describe a rule: Name, Pattern, and Description. In the case of an existing String Filter, you'll only be able to modify the Name and Description fields. Use the Name field to give your pattern a brief, meaningful name. Use the Description field to (1) enter a more indepth explanation of the pattern, (2) understand the reason for its inclusion in the scan, and/or (3) describe a process to correct the problem. Note: The Pattern field must contain a valid Regular Expression. For more information on Regular Expression syntax, click here. Once you've added or modified a String Filter, click the OK button. The String Filters List redisplays, showing your changes.
In this example, the new string filter appears in the list with its checkbox selected. Click the Save button for the changes to take effect, and then the Back to Summary link to return to the Configure I18N Rule Set page.
|