1
import React from 'react';
2
import { OldButton } from '@patternfly/react-core';
✓
Real import
3
4
export const TestComponent = () => {
5
✗
Comment (false positive)
6
const myOldButton = 'something';
✗
Different variable (false positive)
7
const docs = "Check OldButton docs";
✗
String literal (false positive)
8
9
return (
10
<div>
11
<OldButton variant="primary">Click me</OldButton>
✓
Real JSX usage
12
{}
✗
JSX comment (false positive)
13
</div>
14
);
15
};
Analysis Results
Builtin Provider (text pattern matching): 6 matches found
• Lines 2, 5, 6, 7, 11, 12 - any occurrence of "OldButton"
• ✓ 2 real code references (33%)
• ✗ 4 false positives (67%) - comments, strings, variable names
nodejs Provider (semantic analysis): 2 matches found
• Lines 2, 11 only - actual symbol references
• ✓ 2 real code references (100%)
• ✓ 0 false positives (0%) - ignores comments, strings, unrelated variables