False-positive on "? false" in if statement

SonarQube, version 8,5 (build, 37579).
Scanner (for Jenkins), version 2.12

Getting the error underneath, which is clearly a false-positive. Somehow “?? false” seems to cause the problem. The property HasStartupProject is set to true based on the parameters we’ve sent to the application (might be false sometimes as well).

Change this condition so that it does not always evaluate to ‘false’; some subsequent code is never executed.

private void StartupProject()
            if (StartupParameters?.HasStartupProject ?? false)


Welcome to the community!

I’m guessing this is C#…?

We do work on the major languages in each version and there have been several versions since 8.5. In fact, your version is EOL now. You should upgrade at your earliest convenience. Your upgrade path is:

8.5 → 8.9.1 → 9.0 (last step optional)

Please report back to us (and identify the language! :slightly_smiling_face: ) if that doesn’t resolve the problem.