Difference between revisions of "False Positives"

From Lingoport Wiki
Jump to: navigation, search
(What are False Positives)
(What are False Positives)
Line 1: Line 1:
 
=What are False Positives=
 
=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.
+
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 context, the same issue may not need any work and 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 <code>SimpleDateFormat</code>:
 
Let's look at a couple of lines of Java code which creates a date string based on a hard coded date format using <code>SimpleDateFormat</code>:

Revision as of 15:57, 25 August 2015

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 context, the same issue may not need any work and 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