C and C++ AutoConfig for SonarQube

We have big news for our dear C and C++ SonarQube users. Configuring the analysis requires some skills; at times, it can get technical and tedious, with a few known caveats.

We unleashed the talent of our mighty engineers, and they made our C and C++ analyzer smart enough to configure itself. Hence the name AutoConfig. As a result:

  • No need to worry about compiler support
  • No need to worry about build-wrapper or compilation database
  • No need to know anything about the project to configure, nor C neither C++

It works as well as a manually configured analysis for most projects.

How to use it? If you don’t provide a compilation database (generated through the build-wrapper or any other way), AutoConfig will kick in, and your C and C++ code will be automatically analyzed during the scan. As simple as it gets. It was a great moment to revise our C and C++ documentation and it includes all you need to know about AutoConfig.

AutoConfig will land in SonarQube 10.6, and we are looking forward to your feedback on this :slight_smile:

Note that this is a SonarQube-only feature, as SonarCloud benefits from Automatic analysis for C and C++.

11 Likes
C++20 modules support with AutoConfig, incremental bug detection and more
Bugs detection issue with C language
Error during SonarQube Scan
Add support for cc1.exe in build-wrapper?
CFamily: Howto add exotic Clang-Derivative?
Greenhills compiler for ARM cortex-a7
C++ projects are not scanning when using GHS complier in SonarQube Enterprise version
Clang-cl support
Renesas ccrx compiler
C/C++ Sonar scan doesnt work witht e2studio compiler? - no files analyzed
Build-wrapper LabWindows/CVI - 0 C/C++/Objective-C files were analyzed
Custom SonarCFamily default target to be used for unknown targets
Support for the Texas Instrument TMS470 compiler
Unable to run sonar-scanner analysis on c project files
AnalyzerException + IllegalStateException with TI ARM Compiler
TI C2000 compiler failed SonarScanner analysis
Sonar Scanner failed to analyze source code (ERROR: Exception in thread)
java.lang.IllegalStateException : The "build-wrapper-dump.json" file was found empty
Do you have a plan to support C51 and C166 compiler?
Sonar-scanner: The Compilation Database JSON file was found but 0 C/C++/Objective-C files were analy
Sonarscaner сan't parse cpp file on Ubuntu linux
C/C++/Objective-C files were analyzed for 1 of 3 projects
General queries on Sonar
Does SonarQube support analysing C,C++ code build using GCC/G++ compilers for ARM7 architecture
SonarCFamily and 0 compilations units analyzed
SonarQube and C code - error during running sonar-scanner command
SonarQube not finding C code sources even when correctly configured: Sonarcloud + Github actions
How to create a suitable build-wrapper-dump.json for HPE NonStop C source code?
NullPointerException running Scanner for NSK compiler
How do I integrate sonar scanner with Android 10 source tree compilation projects?
Scan the C++ code without using build wrapper or without build the source code
Issue with Build wrapper in Windows
Integrate SonarQube for the project written in C and build with Softools WinIde using Z80/Z180 C compiler
Unable to display C project in sonarqube dashboard
Is there a way to deal with unsupported C compilers?
C/C++/Objective-C and CodeWarrior
SonarQube Keil setup (Error during SonarScanner execution)
How to choose different C++ compiler in sonar properties?
Support for IAR Workbench?
Use of options, builtin macros and command in a Compilation database
Sonar Scanning error
CUDA: 0 C/C++/Objective-C files were analyzed
"build-wrapper-dump.json" file was found empty (windows,C#)
Sonar-scanner, GitLab, C language problem
Sonarqube scanning build-wrapper empty json
Sonarqube scanner GitHub MacOS - Swift - Objective-C - Migration Azure to GitHub
The ā€œbuild-wrapper-dump.jsonā€ file was found empty with xcodebuild
Xilinx SDK 2018.3 0xc0000005 (Status Access Violation)
Error during SonarQube Scanner execution - NullPointerException
SonarQube for HPE NSK cross compiler support?
Compiler support Question
SonarQube and Segger Embedded Studio