Skip to content

V2.2.0

Latest
Compare
Choose a tag to compare
@guwirth guwirth released this 29 Jan 16:46
8aa383f

We are pleased to announce the SonarQube C++ Community Plugin version 2.2.0.
See lists below for features added and bugs fixed in this release.

The version 2.2 of the cxx plugin is a minor update. Essentially, adjustments to the new SonarQube Server 2025 LTS version and updates of the sensors to the latest rules of the corresponding tools took place.


Make sure to read the Upgrade Instructions before you get started.


SonarQube compability

Enhancements

  • new feature to report unknown rules / warnings (Wiki: CXX Unknown Rule) #2806
  • Clang-Tidy:
    • handle clang warnings in the report file (-W) #2803
    • update Clang-Tidy rules LLVM 19.1 #2814
    • handle deprecated rules in ClangTidy LLVM 19.1 #2824
    • LLVM 19.1.0 support #2782 #2640 #2705
  • Cppcheck 2.15.0 support #2745 #2677 #2668 #2591
  • Visual Studio 2022 v17.9 warnings support #2707
  • update gcc rules to 14.2 #2815
    • add deprecated rule keys for gcc #2830
  • MSBuild .LOG support of Visual Studio 2022: Platform toolset v143 #2523 #2491
  • C++23 support #2536
    • C++23: attributte assume #2732
    • C++23: deducing this #2729
    • C++23: extend init-statement to allow alias-declaration #2734
    • C++23: if consteval #2728
    • C++23: lambda changes #2736
    • C++23: multidimensional subscript operator #2733
    • C++23: preprocessor extensions #2727
    • C++23: Trimming whitespaces before line splicing #2749
    • C++23: escape sequences #2744
    • C++23: floating point suffixes #2743
    • C++23: labels at the end of compound statements #2737
    • C++23: literal suffix for (signed) size_t #2742
    • C++23: meaningful exports #2738
    • C++23: some more grammar changes #2740
  • add Infer integration tests #2821

no more supported:

  • removed SQ 8.9 LTS support / integration tests
  • SonarCloud: Java 11 is no longer supported as scanner runtime environment #2617
  • the property 'sonar.login' is deprecated #2657 #2656 #2642

Bugfixes

  • squid: save metrics slow #2520 #2502
  • correct handling of # in preprocessor #2528 #2505
  • fix cognitive complexity problem with r-value references #2675 #2649 #2672
  • Support correct repository (description) for CustomCxxRulesDefinition #2644
  • fix CustomCxxRulesDefinition, remove language #2647
  • JSON Compilation Database: support case sensitive filesystems #2725
  • preprocessor: handle directory names not as filenames #2726
  • improve handling of relative file paths in report files #2747
  • fix PreprocessorChannel: a multiline comment results in a blank #2812

Known Issues

For an up to date list of known issues see the issue tracker.

  • only tested with Java 17: SonarQube nohup.log file item: Error: LinkageError occurred while loading main class org.sonar.application.App java.lang.UnsupportedClassVersionError: org/sonar/application/App has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0. To solve this download OpenJDK 17 and unzip it (http://jdk.java.net/archive/). Point with the JAVA_HOME environment variable to the Java 17 location.
  • In SonarQube, each file extension must be uniquely assigned to one programming language. When operating several C/C++ plugins in parallel, this must be taken into account during configuration. To avoid problems on a server with multiple C++ plugins, the CXX programming language sensor is disabled by default.
  • Ensure that a rule is enabled if you get no results. In new SQ versions the default profile is read-only. The cxx plugin does not enable rules for external tools per default.
  • Message: "C++ cannot be analyzed with current SonarQube edition. Please consider upgrading...". SonarQube issues this message when an input file with the file extension .c, .cc, .cpp, .cxx or .c++ is read in the Community Edition. Select "Dismiss permanently" to continue without the message.
  • the cxx plugin only supports the Standard Experience Mode only but can also be used in Multi-Quality Rule (MQR) Mode, for mapping see #2855
  • sonar.cxx.other.rules: Starting with SonarQube 9.x LTS, a plugin cache mechanism was introduced that only reloads a plugin and thus the rules of a repository if a change to at least one plugin is detected. A “change” can be if there is a plugin with a new PluginKey in the plugin directory. It also checks whether the hash value of a plugin package has changed. If a change is detected, the plugin and thus the repositories it contains are updated.
  • cxx-sslr-toolkit-x.y.z.jar is not a plugin. Do not copy it to the plugins folder. If the JAR file does not contain a SonarQube plugin, the following error message appears in the LOG file when the server is started: ERROR Web server startup failed java.lang.NullPointerException: Plugin key is missing from manifest.

Thanks ....

Thanks to @cmorve-te @opajonk @agebert @smileQiny @Patschkowski @Nekto89 @kragens @baemhai @AndreyAlifanov @fayaz988 for their input and support and all people which were active on the issue tracker!