False Positives

From Lingoport Wiki
Revision as of 15:56, 25 August 2015 by Olibouban (talk | contribs) (What are False Positives)
Jump to: navigation, search

What are False Positives

Globalyzer scans the source code to detect candidate issues based on rules. Given some code, a rule may detect a candidate issue. In one context, that candidate issue may need to be corrected when in another issue, the same issue may not need any work: It is a false positive.

Let's look at a couple of lines of Java code which creates a date string based on a hard coded date format using SimpleDateFormat:

SimpleDateFormat formatter =new SimpleDateFormat("MM/dd/yy");
String dateString = formatter.format(new Date()); 

Using the default Java rule sets, this code will raise i18n issues. If the dateString variable is user facing, this code is indeed an issue to be fixed (for more information, check your rule set help pages).

However, if the dateString variable is used for internal purposes, or a log file for support, it should not be modified and is a false positive.

This section describes different ways to handle rule sets.

Filtering Rules

Code Tags

Workbench Status

Dashboard

Feedback to Lingoport