We are happy to announce improvements and additions to your C and C++ analysis.
If you use a Mac Apple Silicon, you will benefit from a significant improvement in analysis speed (around 30%) as we now ship a dedicated executable. In addition to faster SonarQube and SonarCloud analysis, it will render SonarLint snappier for C and C++.
If you are writing C++23 code, you will be helped by 7 new rules:
- S7032: init-statement in
if
/switch
/for
-range should declare a variable/simple-declaration - S7033:
if consteval
should be used instead ofif (std::is_constant_evaluated())
- S7034: Use
contains
onstring
andstring_view
instead of find or equivalents - S7035: Use “to_underlying” to get the value of an enum
- S7038:
std::stringstream
orstd::spanstream
should be used instead ofstd::strstream
- S7040: Escape sequences should use the delimited form ( \u{}, \o{}, \x{})
- S7042:
std::views::as_const should
be used to prevent modifying range elements
All relevant C and C++ rules are now mapped to the corresponding DISA STIG finding/rule. You can find this information in the rule description in the “More Info” tab.
Last but not least, you can now analyze C23 code.
All these will be available with SonarQube 10.7 starting from Developer Edition. They will be available shortly on SonarCloud and soon on SonarLint.
As always, you can see what’s coming next and vote for C and C++ features you would like to see in SonarQube , SonarCloud , and SonarLint .
Cheers