Update APEX bind regex match for all possible combinations

Matches variables with underscores
Matches `=:food` and `=: foo`
This commit is contained in:
nwcm authored and GitHub committed 2023-05-15 10:55:57 +10:00
1 parent e8c0d5787b
commit 49dc7b75b7
1 file changed
+1 -1
@@ -34,7 +34,7 @@ public class UnusedLocalVariableRule extends AbstractApexRule {
"Database.countQuery".toLowerCase(Locale.ROOT)
));
private static final Pattern BINDING_VARIABLE = Pattern.compile("(?i):([a-z0-9]+)");
private static final Pattern BINDING_VARIABLE = Pattern.compile("(?i):(?:\s|)([_a-z0-9]+)");
@Override
protected @NonNull RuleTargetSelector buildTargetSelector() {