Skip to content

Releases: SonarOpenCommunity/sonar-cxx

Latest Snapshot

21 May 10:44
39e9972
Compare
Choose a tag to compare
Latest Snapshot Pre-release
Pre-release

Commits

  • 76ae027: Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 (dependabot[bot]) #2682

V2.2.0-beta.2

15 Feb 13:14
40da27f
Compare
Choose a tag to compare
V2.2.0-beta.2 Pre-release
Pre-release

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!

V2.1.1

20 May 12:16
5663bbb
Compare
Choose a tag to compare

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.

V2.1.0

08 Feb 10:49
0389bd2
Compare
Choose a tag to compare

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!

V2.0.7

28 Feb 16:06
6f1acc4
Compare
Choose a tag to compare

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.

V2.0.6

11 Nov 07:31
e265c12
Compare
Choose a tag to compare

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

V2.0.5

06 Sep 09:09
b4fd14e
Compare
Choose a tag to compare

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

  • Clang-Tidy: Issues with Windows paths with forward slashes are supported now #2245 #2246
  • PC-lint Plus 1.3.5 warnings support #2221 #2085
  • Cppcheck 2.5 warnings support #2220 #2214
  • Visual Studio 2019 version 16.11 warnings support #2247 #2248

thanks to @Vishal-Gaikwad and @chswap

V2.0.4

24 Jun 05:40
2d4210a
Compare
Choose a tag to compare

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

  • set predefined macro value of __cplusplus to 201402L (C++14) #2203
  • regular expressions of sensors optimized #2188
  • whitespace channel optimized #2200
  • fix highlighting error for identifiers with special meaning: module, import #2202 #2197 #2192
  • make ‚save measures’ for InputFiles more robust #2194
  • C++ Parser can't read code. Declaration is skipped #2198
    • Add last known token with position. Problem is most likely before/after this token

V2.0.3

08 Jun 08:54
c83dbfe
Compare
Choose a tag to compare

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

  • improved Clang-Tidy sensor #2167 #2168 #2170 #2174 #2175
    • supports Clang-Tidy v11 messages with multiple check (alias) ids #2170
    • fix Clang-Tidy column number reporting (column numbers in Clang-Tidy: 1...n; SQ: 0...n)
    • be more tolerant in case of invalid column number: report issue in line (without column)
    • improve error message in case of wrong line/column number
  • make the loading of other rules more robust #2179
  • fix java.lang.NullPointerException in AbstractCxxPublicApiVisitor.visitTemplateDeclaration #2180 #2182
  • improve config description #2181

V2.0.2

24 May 09:04
4f9280b
Compare
Choose a tag to compare

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

  • fix file encoding support (UTF-8, UTF-16, with/without BOM) #2143
  • public API detection: improved detection of comments at the end of last line #2163