Sonar Cxx Versions Save

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.

latest-snapshot

1 week ago

Commits

  • f16c3db: fix cognitive complexity (guwirth) #2675

cxx-2.2.0-beta.2

2 months ago

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

The main purpose of this beta version is to be able to use the cxx plugin with SonarQube 10.x.

SonarQube compability

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

Enhancements

  • #2616 provides SonarQube 10 compatibility
  • #2633 update cxx plugin version number to 2.2.0
  • other features same as V2.1.1

Thanks ....

goes to @agebert for providing this!

cxx-2.2.0-beta.1

3 months ago
  • tested and released for SonarQube 10.3 with Java 17 (other versions are not supported)
  • #2616 provides SonarQube 10 compatibility
  • plugin and file version is still V2.1.2.620 (not V2.2.x)
  • other features same as V2.1.1

cxx-2.1.1

11 months ago

We are pleased to announce the SonarQube C++ Community Plugin version 2.1.1. This is only a small enhancement and bugfix release, see V2.1.0 for complete release notes.

Hint: The update mainly fixes performance problems that occur when switching to SonarQube 9.9 LTS with projects with many files. To fix the problems you should install the latest version of SonarQube 9.9 LTS (>=9.9.1) and cxx plugin (>=2.2.1).

Enhancements

  • MSBuild .LOG support of Visual Studio 2022: Platform toolset v143 #2523 #2491

Bugfixes

  • cxx plugin 2.1 slow with SonarQube 9.9.0 LTS #2518
  • squid: save metrics slow #2520 #2502
  • correct handling of # in preprocessor #2528 #2505

Thanks to @Nekto89, @AndreyAlifanov and @fayaz988 for their input and support.

cxx-2.1.0

1 year ago

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!

cxx-2.1.0.386

1 year ago

We are pleased to announce the SonarQube C++ Community Plugin version 2.1.0. This is only a pre-release version, intended to test the next SonarQube 9.9 LTS.

SonarQube compability

What's changed in addition to V2.1.0.349

  • tested with latest SQ versions SQ 8.9.10.61524 SQ 9.8.0.63668 #2458
  • Cppcheck 2.90 support #2455
  • Clang-Tidy V16 support #2456
  • Clang Static Analyzer V16 support #2470
  • Visual Studio 2022 warnings support #2460
  • use remediation function CONSTANT_ISSUE like the other plugins #2462
    • old: remediationFunction=LINEAR; remediationFunctionGapMultiplier=5min
    • new: remediationFunction=CONSTANT_ISSUE; remediationFunctionBaseEffort=5min
  • use local solution for deprecated org.sonar.api.server.rule.RulesDefinitionXmlLoader #2461

cxx-2.1.0.349

1 year ago

We are pleased to announce the SonarQube C++ Community Plugin version 2.1.0. This is only a pre-release, final relase will be with SonarQube 9.x LTS.

SonarQube compability

What's Changed

  • SonarQube 9.x compatibility #2337
  • tested with latest SQ versions SQ 8.9.10.61524 SQ 9.7.1.62043 #2437
  • GitHub Actions support #2304 #2438
  • use Python 3.7 for integration tests #2332
  • removed SQ 7.9 LTS integration tests #2329
  • improved performance: search in configuration XML tree with XPath was very slow #2383 #2410
  • Analyse only files that are contained in the 'JSON Compilation Database' (sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles=True/False) #2430 #2449
  • C++23: support #elifdef and #elifndef #2411
  • 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
  • fix preprocessor: nested #ifdef ... #else #2373
  • fix "Unable to lex string source code" error with __has_include #2369 #2371
  • 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

New Contributors

Full Changelog: https://github.com/SonarOpenCommunity/sonar-cxx/compare/cxx-2.0.7...cxx-2.1.0.349

cxx-2.0.7

2 years ago

We are pleased to announce the SonarQube C++ Community Plugin version 2.0.7. This is only a small enhancement and bugfix release, see V2.0.0 for complete release notes.

Enhancements

  • Cppcheck 2.70 support #2307
  • Clang-Tidy v15 support #2324

Bugfixes

  • uppercase file paths in Xunit reports are changed to lowercase on case sensitive operating systems #2303 #2302
  • fix placement new issue #2315 #2314
  • fix parsing error when using template type parameter with assignment #2321 #2317
  • fix parsing error with right angle bracket detection #2319 #2318 #2291 #2286
  • improve type traits support #2316
    • template parameter std::enable_if_t not parsed #2305
    • C++14: add type traits helper support #2306

Thanks to @slnj, @jnicol31 and @amai2012 for their input and support.

cxx-2.1.x-beta1

2 years ago

This is a first beta version of cxx plugin with SQ 9.x support, the final version will be cxx plugin 2.1.0.

  • This version has the same features as cxx plugin 2.0.6.
  • All internal unit tests and integration tests have been passed successfully.
  • source code is on branch master-2.1.x, see also #2274
  • tested with SonarQube 9.1.0.47736 only

Thanks to @yachoor for the support!

cxx-2.0.6

2 years ago

We are pleased to announce the SonarQube C++ Community Plugin version 2.0.6. This is only a small enhancement and bugfix release, see V2.0.0 for complete release notes.

  • introduce a configuration parameter to disable the Squid sensor: sonar.cxx.squid.disabled #2080 #2262 #1682 #2228
    • Disable parsing of source code, syntax highlighting and metric generation. The source files are still indexed, reports can be read and their results displayed. Turning off will speed up reading of source files.
  • update rules from LLVM tools to version 13 #2270
    • Clang-Tidy and Clang Static Analyzer tool
  • Cppcheck 2.60 support #2265
  • support Cobertura coverage reports with 'drive letter only' in source tag #2268
  • UndocumentedApi check: support enumerations without name #2277
    • did give a wrong error message so far

thanks to @andreydanin