Skip to content

V2.1.0

Compare
Choose a tag to compare
@guwirth guwirth released this 08 Feb 10:49
· 202 commits to master since this release
0389bd2

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

The version 2.1 of the cxx plugin is a minor update. Essentially, adjustments to the new SonarQube 9.9 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

  • The plugin requires Java 11 or Java 17 on scanner side: install a Java version (e.g http://jdk.java.net/archive/) and update JAVA_HOME to point to the installation directory.

Enhancements

with effect on configuration:

  • Analyse only files that are contained in the 'JSON Compilation Database' (sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles=True/False) #2430 #2449

other:

  • support Feature Checking Macros __has_builtin __has_feature __has_extension __has_cpp_attribute __has_c_attribute __has_attribute __has_declspec_attribute __is_identifier __has_warning #2406
  • improved performance: search in configuration XML tree with XPath was very slow #2383 #2410
    • especially 'JSON Compilation Database' usage should be much faster
  • Cppcheck 2.9 support #2455
  • Clang-Tidy V16 support #2456
  • Clang Static Analyzer V16 support #2470
  • Visual Studio 2022 warnings support #2460
  • use remediation function CONSTANT_ISSUE for rules like the other plugins #2462
    • old: remediationFunction=LINEAR; remediationFunctionGapMultiplier=5min
    • new: remediationFunction=CONSTANT_ISSUE; remediationFunctionBaseEffort=5min
  • C++23: support #elifdef and #elifndef #2411
  • use local solution for deprecated org.sonar.api.server.rule.RulesDefinitionXmlLoader #2461
  • Adding new shell script generate_clangtidy_resources.sh by @aallrd in #2375 #2382
  • preprocessor refactoring #2380 #2381 #2386 #2388 #2389 #2390 #2391 #2392 #2393 #2394 #2397 #2400 #2426 #2362
  • use GitHub Actions for integration tests #2304 #2438
  • use Python 3.7 for integration tests #2332

no more supported:

  • removed SQ 7.9 LTS support / integration tests #2329

Bugfixes

  • fix preprocessor: nested #ifdef ... #else #2373
  • fix "Unable to lex string source code" error with __has_include #2369 #2371

Known Issues

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

  • only tested with Java 11 and Java 17
    • Message "The plugin [cxx] does not support Java 1.8.0, UnsupportedClassVersionError". To solve this download OpenJDK 11 or 17 and unzip it (http://jdk.java.net/archive/). Point with the JAVA_HOME environment variable to the Java 11 or 17 location.
    • 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.
  • 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 ....

go to all contributors and all people which were active on the issue tracker!