Here is the code that generates the false positive:
constexpr char AUTHCODE_ACCURACYLEVEL_OPTION_RTK = 'R';
auto receiverModelHasRTKAccuracy = [](const std::string &modelString) {
return modelString[ConstantsNovatel::AUTHCODE_ACCURACYLEVEL_OPTION_INDICATOR] ==
ConstantsNovatel::AUTHCODE_ACCURACYLEVEL_OPTION_RTK;
};
Must-share information (formatted with Markdown ):
which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
how is SonarQube deployed: zip, Docker, Helm
what are you trying to achieve
what have you tried so far to achieve this
Do not share screenshots of logs β share the text itself (bonus points for being well-formatted)!
ganncamp
(G Ann Campbell)
March 13, 2025, 1:40pm
2
Hi,
Welcome to the community!
What version of SonarQube are you seeing this in?
Thx,
Ann
How can I tell what version of SonarQube I am using?
ganncamp
(G Ann Campbell)
March 13, 2025, 7:59pm
4
Hi,
Itβs in your page footer.
HTH,
Ann
1 Like
With the example code I submitted, SonarQube is saying that modelString is an unused parameter. It is being used.
ganncamp
(G Ann Campbell)
March 14, 2025, 12:31pm
7
Hi,
Your version is way past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:
7.9.6 β 8.9.10 β 9.9.9 β 2025.1.1
You may find these resources helpful:
If you have questions about upgrading, feel free to open a new thread for that here .
If you can still reproduce this after you upgrade, weβd love to hear about it!
Thx,
Ann