I'm coding a custom rule for a Java. There are two Tree.KIND instances (STRING_LITERAL and ASSIGNMENT) to be captured. There is a particular line where both the logic of String Literal and Assignment throws an issue. But sonar test throws error saying
Unexpected at [Line number]
That particular line has the comment // Noncompliant to denote issue. But still the test case failed since the same error is caught by two different logic.