pshem
(Pshem)
February 17, 2023, 6:55pm
1
Make sure to read this post before raising a thread here:
Hey SonarSource Community!
False-positives happen , as do false-negatives, and we’re eager to fix them. We are thrilled when our users report problems, so 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’t…
Then tell us:
What language is this for? Java
Which rule? java:S2187
Why do you believe it’s a false-positive/false-negative? False positive
Are you using
SonarCloud?
SonarQube - which version? 8.9.7 (build 52159)
SonarLint - which IDE/version?
in connected mode with SonarQube or SonarCloud?
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
import static io.cucumber.junit.platform.engine.Constants.*;
import org.junit.platform.suite.api.*;
@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("com.project.class.path")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value="com.project.class.path")
public class IntegrationTest {}
Colin
(Colin)
February 20, 2023, 8:38am
2
Hey there.
This FP might have been fixed by SONARJAVA-3844 (available in SonarQube v9.9 LTS ). Can you try the new LTS version to see if the FP persists?
pshem
(Pshem)
February 20, 2023, 9:16am
3
Unfortunately, I’m not in control of my organization’s Sonar maintenance schedule. I’ll try to update the thread when we eventually update. It does appear my organization only updates to LTS versions, so 9.9 might be on the calendar this year
pshem
(Pshem)
December 19, 2024, 10:35am
4
My organization upgraded to Sonar 9.9.1 (build 69595), but the code smell persists
Seems like a version of SONARJAVA-2022 for Cucumber with JUnit5 will be necessary
Thank you for the report! I created SONARJAVA-5262 for tracking.