QT project with SonarQube

I have QT project written in C++ and I want to the scan the code with SonarQube and integrate with Jenkins, I have developer edition can anyone suggest me the procedure as I am new with Developer Edition

Hi,

Welcome to the community!

The docs should get you started.

 
HTH,
Ann

I am Unable download c/c++ plugin and it is not available in extensions plugin folder of SonarQube.
With which verion of MSBuild SonarScanner should I use to scan my project

Hi,

C++ analysis starts in Developer Edition($) and when you’re using that edition, you don’t need to install a plugin, it’s out-of-the-box.

 
Ann

Hi Ann,

These are the sonar properties I am using for my QT project

sonar.projectKey=Jekson
sonar.projectName=Bismart
sonar.projectVersion=1.0
sonar.sources=D:\\SonarBisworkspace
sonar.cfamily.build-wrapper-output=build_wrapper_output_directory
sonar.sourceEncoding=UTF-8
sonar.ce.javaOpts=-server -Xmx8192m -Xms512m -XX:+HeapDumpOnOutOfMemoryError
sonar.exclusions=**\\*.java, **\\*.ts, \\External_Depends\\**\\*, **\\*.obj, **\\*.svg, **\\*.qm, **\\*.qml, **\\*.dll, **\\*.png, **\\*.ttf, **\\*.rc, \\biSmartIP\\*.h, **\\*.cbt
sonar.cfamily.threads=12

this is the error I am facing can you suggest how to solve
error o/p:

WARN: Property 'sonar.login' with value 'c4db2a9c6875fb3486d20d987c2628ba28100f60' is overridden with value 'admin'
INFO: Scanner configuration file: C:\Users\nirmal mahiya\AppData\Local\Jenkins\.jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.0.2311
INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\nirmal mahiya\.sonar\cache
INFO: Scanner configuration file: C:\Users\nirmal mahiya\AppData\Local\Jenkins\.jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.9.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
WARN: SonarScanner will require Java 11 to run, starting in SonarQube 9.x
INFO: Load global settings
INFO: Load global settings (done) | time=142ms
INFO: Server id: BF41A1F2-AXnsDYhVeRwzAh4Lug9u
INFO: User cache: C:\Users\nirmal mahiya\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=127ms
INFO: Load/download plugins (done) | time=197ms
INFO: Loaded core extensions: developer-scanner
INFO: JavaScript/TypeScript frontend is enabled
INFO: Process project properties
INFO: Process project properties (done) | time=5ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: Jekson
INFO: Base dir: D:\SonarBisworkspace
INFO: Working dir: D:\SonarBisworkspace\.scannerwork
INFO: Load project settings for component key: 'Jekson'
INFO: Load project branches
INFO: Load project branches (done) | time=101ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=101ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=1ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=245ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load active rules
INFO: Load active rules (done) | time=3754ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **\*.java, **\*.ts, \External_Depends\**\*, **\*.obj, **\*.svg, **\*.qm, **\*.qml, **\*.dll, **\*.png, **\*.ttf, **\*.rc, \biSmartIP\*.h, **\*.cbt
INFO: 971 files indexed
INFO: 14361 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for c: Sonar way
INFO: Quality profile for cpp: Sonar way
INFO: Quality profile for plsql: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module Bismart
INFO: JavaScript/TypeScript frontend is enabled
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=109ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor PL/SQL Sensor [plsql]
WARN: The Data Dictionary is not configured for PLSQL analyzer which prevents rule(s) S3641, S3921, S3618, S3651 to raise issues. 
INFO: 1 source files to be analyzed
INFO: Load project repositories
INFO: Load project repositories (done) | time=99ms
INFO: 1/1 source files have been analyzed
INFO: Sensor PL/SQL Sensor [plsql] (done) | time=195ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=2ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Sensor JavaXmlSensor [java] (done) | time=120ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=3ms
INFO: Sensor XML Sensor [xml]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=256ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=1ms
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.20.0.31240
INFO: Using build-wrapper output: D:\SonarBisworkspace\build_wrapper_output_directory\build-wrapper-dump.json
INFO: Available processors: 12
INFO: Using 12 threads for analysis according to value of "sonar.cfamily.threads" property.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:02.021s
INFO: Final Memory: 12M/1204M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: GC overhead limit exceeded

Hi,

It’s not my area of expertise but I suspect your problem might be related to this:

Additionally, the docs should help.

 
Ann