MisterPi
(Mister Pi)
June 23, 2022, 11:42pm
#1
SQ 8.6 Community
We get the following error about 2 statements in a line:
I’m not sure what the issue is. It’s not the case label and the assignment being on the same line, because it isn’t flagged for case 2 or 3. It’s not the curly being on the same line as the case label, because when I put a line break after the colon in SonarLint, the issue goes away (the flag on “switch” is for a missing default case):
Can you explain?
Colin
(Colin)
June 24, 2022, 11:05am
#2
Hey there.
I’ve moved your post to the section dedicated for reporting false-positives.
Hey SonarSource Community!
False-positives happen , as do false-negatives, and we’re eager to fix them. We are thrilled when our users report issues so that we can make our products better.
What is a false-positive (FP)?
A false-positive is when an issue is raised unexpectedly on code that should not trigger an issue, or where the suggested action doesn’t make any sense for the code.
What is a false-negative (FN)?
A false-negative is when an issue should be raised on a piece of code, but isn…
Please make sure that:
You provide a text-based snippet of code that reproduces the issue, rather than a screenshot
The issue can be reproduced either on the latest version of SonarQube, or on the latest version of SonarLint (not in connected mode)