Running sonar-scanner.bat on CPP workspace shows "0 files indexed"

Must-share information (formatted with Markdown):

SONARSOURCE VERSIONS:
SonarQube version: Developer EditionVersion 8.0 (build 29455)
(hosted on azure: http://oursonarqube001:8765 )
sonar-scanner.bat version: sonar-scanner-cli-4.2.0.1873-windows
build-wrapper.bat version: build-wrapper, version 6.4 (win-x86-64)
note: we used build-wrapper on our nmake (MSVC 2017 v14.16.27023)
Plugin versions: There are a ton of plugins, the C++ plugin we updated to is:
SonarCFamily (Supported by SonarSource) 6.6
(I can supply list other plugins if it helps.)
System: Windows 10
Console: Git Bash window (e.g. MINGW64):
Code type: C++

PROBLEM SUMMARY:
I am trying to run sonar-scanner.bat over cpp codebase to generate code analysis info that should get posted to our SonarQube server. The sonar-scanner.bat runs, but we always get “0 files indexed” which I believe is why we get empty data posted to SonarQube.

To Expand on this a bit more:

  • I am setting up a brand new environment and I am new so I expect my issues
    are caused by inexperience. I spent yesterday scouring various threads with no luck.
  • Our C++ code compiles (our compiler is wrapped with the build-wrapper.bat script)
  • we run sonar-scanner.bat from command line in Base Dir that contains sonar-project.properties.
  • our scanner appears to find sonar-properties files, identifies Base Dir, identifies correct Included
    source files, etc. The scan appears to complete but ALWAYS finds 0 indexed files.
  • our sonarQube server (on Azure) identifes a scan occurred but contains NOTHING in it.
    It appears as if there were no files found with the sonar-scanner.

We run from the desired Base dir. Our Included source files are contained under the Base dir, so I
expect them to be found but they appear to NOT be found.
The console log run below indicates that the “Included sources” is correct.
But our files are never indexed (as indicated by the “0 files indexed” message.
I suspect this is why we get empty scan runs with no data posted to our SonarQube server.

What have you tried so far to achieve this
We do run it and it is really close but appears to not analyze anything.
We’ve tried plugin upgrades. We tried tweaking property files. We tried verifying logs exist. We’ve gone through a ton of threads but haven’t seemed to hit the right fix yet.

QUESTION:

  1. Does “0 files indexed” mean that the sonar-scanner.bat found NO (cpp) files to scan?
    Or maybe “0 files indexed” doesn’t really mean what I think?
  2. Could it be that sonar-scanner.bat needs to find both cpp files AND obj files? Maybe it also needs to find generated LOGS or something else?

Any suggestions appreciated!!

FILE DETAILS:

Sonar-project.properties: /c/Jenkins/jobs/workspace/27-sonarqube-jenkins-integration/sonar-project.properties
Sonar-project.properties Content:

	sonar.projectKey=MobilePlannerProject
	sonar.projectName=MobilePlanner C++ Project
	sonar.projectVersion=1.0
	sonar.sources=.
	sonar.scm.exclusions.disabled=true
	sonar.sourceEncoding=UTF-8
	sonar.cfamily.build-wrapper-output=C:\sonarQube\LOGS
	sonar.host.url=http://oursonarqube001:8765
	sonar.login=FAKEUSER
	sonar.password=FAKEPWD

sonar-scanner.properties: /c/sonarQube/sonar-scanner-cli-4.2.0.1873-windows/conf/sonar-scanner.properties
sonar-scanner.properties Content:

	sonar.host.url=http://oursonarqube001:8765
	sonar.login=FAKEUSER
	sonar.password=FAKEPWD
	sonar.sourceEncoding=UTF-8

sonar.cfamily.build-wrapper-output = C:\sonarQube\LOGS:
hint: This LOGS dir contains 2 files:
build-wrapper.log (size 4,635KB) and
build-wrapper-dump.json (1,548KB)

EXECUTE COMMAND (run from Base dir):
/c/sonarQube/sonar-scanner-cli-4.2.0.1873-windows/bin/sonar-scanner.bat --debug -Dproject.settings=sonar-project.properties

LOG FROM RUNNING EXECUTE COMMAND ABOVE:
C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>“C:\sonarQube\sonar-scanner-cli-4.2.0.1873-windows\bin…\jre\bin\java.exe” -Djava.awt.headless=true -cp “C:\sonarQube\sonar-scanner-cli-4.2.0.1873-windows\bin…\lib\sonar-scanner-cli-4.2.0.1873.jar” “-Dscanner.home=C:\sonarQube\sonar-scanner-cli-4.2.0.1873-windows\bin…” “-Dproject.home=C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration” org.sonarsource.scanner.cli.Main --debug -Dproject.settings=sonar-project.properties

09:27:06.036 INFO: Scanner configuration file: C:\sonarQube\sonar-scanner-cli-4.2.0.1873-windows\bin…\conf\sonar-scanner.properties
09:27:06.040 INFO: Project root configuration file: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration\sonar-project.properties
09:27:06.062 INFO: SonarQube Scanner 4.2.0.1873
09:27:06.062 INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
09:27:06.062 INFO: Windows 7 6.1 amd64
09:27:06.215 DEBUG: keyStore is :
09:27:06.215 DEBUG: keyStore type is : pkcs12
09:27:06.215 DEBUG: keyStore provider is :
09:27:06.216 DEBUG: init keystore
09:27:06.216 DEBUG: init keymanager of type SunX509
09:27:06.382 DEBUG: Create: C:\Users\swtest.sonar\cache
09:27:06.382 INFO: User cache: C:\Users\swtest.sonar\cache
09:27:06.382 DEBUG: Create: C:\Users\swtest.sonar\cache_tmp
09:27:06.384 DEBUG: Extract sonar-scanner-api-batch in temp…
09:27:06.389 DEBUG: Get bootstrap index…
09:27:06.389 DEBUG: Download: http://oursonarqube001:8765/batch/index
09:27:06.501 DEBUG: Get bootstrap completed
09:27:06.506 DEBUG: Create isolated classloader…
09:27:06.517 DEBUG: Start temp cleaning…
09:27:06.530 DEBUG: Temp cleaning done
09:27:06.530 DEBUG: Execution getVersion
09:27:06.540 INFO: SonarQube server 8.0.0
09:27:06.541 INFO: Default locale: “en_US”, source code encoding: “UTF-8”
09:27:06.542 DEBUG: Work directory: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork
09:27:06.543 DEBUG: Execution execute
09:27:06.796 DEBUG: Developer 8.0.0.29455
09:27:06.904 INFO: Load global settings
09:27:07.424 DEBUG: GET 200 http://oursonarqube001:8765/api/settings/values.protobuf | time=519ms
09:27:07.468 INFO: Load global settings (done) | time=564ms
09:27:07.478 INFO: Server id: A77031D2-AW6MpAnorvUdiRsyhCLF
09:27:07.482 INFO: User cache: C:\Users\swtest.sonar\cache
09:27:07.488 INFO: Load/download plugins
09:27:07.488 INFO: Load plugins index
09:27:07.924 DEBUG: GET 200 http://oursonarqube001:8765/api/plugins/installed | time=436ms
09:27:07.986 INFO: Load plugins index (done) | time=498ms
09:27:08.144 INFO: Load/download plugins (done) | time=656ms
09:27:08.300 DEBUG: Plugins:
09:27:08.300 DEBUG: * SonarCSS 1.1.1.1010 (cssfamily)
09:27:08.300 DEBUG: * Svn 1.9.0.1295 (scmsvn)
09:27:08.300 DEBUG: * SonarPLSQL 3.4.1.2576 (plsql)
09:27:08.300 DEBUG: * SonarScala 1.5.0.315 (sonarscala)
09:27:08.300 DEBUG: * SonarC# 7.17.0.9346 (csharp)
09:27:08.300 DEBUG: * Vulnerability Analysis 8.0.0.5505 (security)
09:27:08.300 DEBUG: * SonarJava 5.14.0.18788 (java)
09:27:08.300 DEBUG: * SonarHTML 3.2.0.2082 (web)
09:27:08.300 DEBUG: * SonarFlex 2.5.1.1831 (flex)
09:27:08.301 DEBUG: * SonarXML 2.0.1.2020 (xml)
09:27:08.301 DEBUG: * SonarTS 1.9.0.3766 (typescript)
09:27:08.301 DEBUG: * SonarVB 7.17.0.9346 (vbnet)
09:27:08.301 DEBUG: * SonarSwift 4.1.0.3087 (swift)
09:27:08.301 DEBUG: * SonarCFamily 6.6.0.13759 (cpp)
09:27:08.301 DEBUG: * SonarPython 1.16.0.4432 (python)
09:27:08.301 DEBUG: * JaCoCo 1.0.2.475 (jacoco)
09:27:08.301 DEBUG: * SonarGo 1.6.0.719 (go)
09:27:08.301 DEBUG: * SonarKotlin 1.5.0.315 (kotlin)
09:27:08.301 DEBUG: * SonarTSQL 1.4.0.3334 (tsql)
09:27:08.301 DEBUG: * SonarJS 5.2.1.7778 (javascript)
09:27:08.302 DEBUG: * SonarRuby 1.5.0.315 (ruby)
09:27:08.302 DEBUG: * Vulnerability Rules for C# 8.0.0.5505 (securitycsharpfrontend)
09:27:08.302 DEBUG: * Vulnerability Rules for Java 8.0.0.5505 (securityjavafrontend)
09:27:08.302 DEBUG: * License for SonarLint 8.0 (license)
09:27:08.302 DEBUG: * Git 1.9.1.1834 (scmgit)
09:27:08.302 DEBUG: * SonarPHP 3.2.0.4868 (php)
09:27:08.302 DEBUG: * SonarABAP 3.8.0.2034 (abap)
09:27:08.302 DEBUG: * Vulnerability Rules for PHP 8.0.0.5505 (securityphpfrontend)
09:27:08.327 INFO: Loaded core extensions: developer-scanner
09:27:08.344 DEBUG: Installed core extension: developer-scanner
09:27:08.741 INFO: Process project properties
09:27:08.748 INFO: Process project properties (done) | time=7ms
09:27:08.749 INFO: Execute project builders
09:27:08.749 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
09:27:08.752 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
09:27:08.755 INFO: Execute project builders (done) | time=7ms
09:27:08.760 INFO: Project key: MobilePlannerProject
09:27:08.760 INFO: Base dir: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration
09:27:08.760 INFO: Working dir: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork
09:27:08.761 DEBUG: Project global encoding: UTF-8, default locale: en_US
09:27:08.763 DEBUG: Creating module hierarchy
09:27:08.763 DEBUG: Init module ‘MobilePlanner C++ Project’
09:27:08.764 DEBUG: Base dir: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration
09:27:08.764 DEBUG: Working dir: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork
09:27:08.765 DEBUG: Module global encoding: UTF-8, default locale: en_US
09:27:08.771 INFO: Load project settings for component key: ‘MobilePlannerProject’
09:27:09.225 DEBUG: GET 200 http://oursonarqube001:8765/api/settings/values.protobuf?component=MobilePlannerProject | time=454ms
09:27:09.227 INFO: Load project settings for component key: ‘MobilePlannerProject’ (done) | time=456ms
09:27:09.238 INFO: Load project branches
09:27:10.692 DEBUG: GET 200 http://oursonarqube001:8765/api/project_branches/list?project=MobilePlannerProject | time=1454ms
09:27:10.700 INFO: Load project branches (done) | time=1462ms
09:27:10.701 INFO: Load project pull requests
09:27:11.816 DEBUG: GET 200 http://oursonarqube001:8765/api/project_pull_requests/list?project=MobilePlannerProject | time=1114ms
09:27:11.822 INFO: Load project pull requests (done) | time=1121ms
09:27:11.822 INFO: Load branch configuration
09:27:11.824 INFO: Load branch configuration (done) | time=2ms
09:27:11.873 DEBUG: Available languages:
09:27:11.873 DEBUG: * CSS => “css”
09:27:11.873 DEBUG: * PL/SQL => “plsql”
09:27:11.873 DEBUG: * Scala => “scala”
09:27:11.873 DEBUG: * C# => “cs”
09:27:11.873 DEBUG: * Java => “java”
09:27:11.873 DEBUG: * HTML => “web”
09:27:11.874 DEBUG: * JSP => “jsp”
09:27:11.874 DEBUG: * Flex => “flex”
09:27:11.874 DEBUG: * XML => “xml”
09:27:11.874 DEBUG: * TypeScript => “ts”
09:27:11.874 DEBUG: * VB.NET => “vbnet”
09:27:11.874 DEBUG: * Swift => “swift”
09:27:11.874 DEBUG: * C => “c”
09:27:11.874 DEBUG: * C++ => “cpp”
09:27:11.874 DEBUG: * Objective-C => “objc”
09:27:11.874 DEBUG: * Python => “py”
09:27:11.874 DEBUG: * Go => “go”
09:27:11.874 DEBUG: * Kotlin => “kotlin”
09:27:11.874 DEBUG: * T-SQL => “tsql”
09:27:11.874 DEBUG: * JavaScript => “js”
09:27:11.874 DEBUG: * Ruby => “ruby”
09:27:11.874 DEBUG: * PHP => “php”
09:27:11.875 DEBUG: * ABAP => “abap”
09:27:11.880 INFO: Load quality profiles
09:27:12.446 DEBUG: GET 200 http://oursonarqube001:8765/api/qualityprofiles/search.protobuf?projectKey=MobilePlannerProject | time=565ms
09:27:12.681 INFO: Load quality profiles (done) | time=801ms
09:27:12.696 INFO: Load active rules
09:27:13.202 DEBUG: GET 200 http://oursonarqube001:8765/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AW6MpZSxrvUdiRsyhEBa&ps=500&p=1 | time=505ms

. . . lots of rules info clipped for brevity plus the fact that I exceeded my character limit . . .

09:27:24.875 INFO: Load active rules (done) | time=12179ms
09:27:24.913 INFO: Exclusions based on SCM info is disabled by configuration
09:27:24.946 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : /*.css,/.less,**/.scss
09:27:24.946 DEBUG: Declared extensions of language PL/SQL were converted to sonar.lang.patterns.plsql : /*.sql,/.pks,**/.pkb
09:27:24.947 DEBUG: Declared extensions of language Scala were converted to sonar.lang.patterns.scala : /.scala
09:27:24.947 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/
.cs
09:27:24.947 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : /*.java,/.jav
09:27:24.947 DEBUG: Declared extensions of language HTML were converted to sonar.lang.patterns.web : **/
.html,
/.xhtml,**/.cshtml,/*.vbhtml,/.aspx,**/.ascx,/*.rhtml,/.erb,**/.shtm,/.shtml
09:27:24.947 DEBUG: Declared extensions of language JSP were converted to sonar.lang.patterns.jsp : **/
.jsp,
/.jspf,**/.jspx
09:27:24.947 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : /.as
09:27:24.948 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/
.xml,
/.xsd,**/.xsl
09:27:24.948 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : /*.ts,/.tsx
09:27:24.948 DEBUG: Declared extensions of language VB.NET were converted to sonar.lang.patterns.vbnet : **/
.vb
09:27:24.948 DEBUG: Declared extensions of language Swift were converted to sonar.lang.patterns.swift : /.swift
09:27:24.948 DEBUG: Declared extensions of language C were converted to sonar.lang.patterns.c : **/
.c,
/.h
09:27:24.948 DEBUG: Declared extensions of language C++ were converted to sonar.lang.patterns.cpp : **/
.cc,/*.cpp,/.cxx,**/.c++,/*.hh,/.hpp,**/.hxx,/*.h++,/.ipp
09:27:24.949 DEBUG: Declared extensions of language Objective-C were converted to sonar.lang.patterns.objc : **/
.m
09:27:24.949 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : /.py
09:27:24.949 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/
.go
09:27:24.949 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : /.kt
09:27:24.949 DEBUG: Declared extensions of language T-SQL were converted to sonar.lang.patterns.tsql : **/
.tsql
09:27:24.949 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : /*.js,/*.jsx,
/.vue
09:27:24.949 DEBUG: Declared extensions of language Ruby were converted to sonar.lang.patterns.ruby : **/
.rb
09:27:24.950 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : /*.php,/*.php3,
/.php4,**/.php5,/*.phtml,/.inc
09:27:24.950 DEBUG: Declared extensions of language ABAP were converted to sonar.lang.patterns.abap : **/
.abap,/*.ab4,/.flow,**/.asprog
09:27:24.953 DEBUG: Will ignore generated code
09:27:24.955 DEBUG: Will ignore generated code
09:27:24.958 INFO: Indexing files…
09:27:24.958 INFO: Project configuration:
09:27:24.959 INFO: Included sources: **/Aria/include/.h, **/Aria/src/.cpp, **/Aria/ArNetworking/include/.h, **/Aria/ArNetworking/src/.cpp, **/Aria/ArQ/include//.h, **/Aria/ArQ/src//.cpp, **/Clients/Editor/include//.h, **/Clients/Editor/src//.h
09:27:24.959 INFO: Excluded sources: .ts, moc_
09:27:30.617 INFO: 0 files indexed
09:27:30.618 INFO: 0 files ignored because of inclusion/exclusion patterns
09:27:30.618 INFO: ------------- Run sensors on module MobilePlanner C++ Project
09:27:30.750 INFO: Load metrics repository
09:27:31.201 DEBUG: GET 200 http://oursonarqube001:8765/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=451ms
09:27:31.214 INFO: Load metrics repository (done) | time=464ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/swtest/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
09:27:33.134 DEBUG: ‘JavaSquidSensor’ skipped because there is no related file in current project
09:27:33.135 DEBUG: ‘Import external issues report’ skipped because one of the required properties is missing
09:27:33.135 DEBUG: ‘SonarCSS Metrics’ skipped because there is no related file in current project
09:27:33.135 DEBUG: ‘SonarCSS Rules’ skipped because there is no related file in current project
09:27:33.135 DEBUG: ‘Import of stylelint issues’ skipped because there is no related file in current project
09:27:33.135 DEBUG: ‘PL/SQL Sensor’ skipped because there is no related file in current project
09:27:33.136 DEBUG: ‘Scala Sensor’ skipped because there is no related file in current project
09:27:33.136 DEBUG: ‘Scoverage sensor for Scala coverage’ skipped because one of the required properties is missing
09:27:33.136 DEBUG: ‘Import of Scalastyle issues’ skipped because there is no related file in current project
09:27:33.136 DEBUG: ‘Import of Scapegoat issues’ skipped because there is no related file in current project
09:27:33.136 DEBUG: ‘C# Properties’ skipped because there is no related file in current project
09:27:33.137 DEBUG: ‘Import of Checkstyle issues’ skipped because there is no related file in current project
09:27:33.137 DEBUG: ‘Import of PMD issues’ skipped because one of the required properties is missing
09:27:33.138 DEBUG: ‘Import of SpotBugs issues’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘SurefireSensor’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘JaCoCoSensor’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘HTML’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘Flex’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘Flex Cobertura’ skipped because there is no related file in current project
09:27:33.138 DEBUG: ‘XML Sensor’ skipped because there is no related file in current project
09:27:33.139 DEBUG: ‘SonarTS’ skipped because there is no related file in current project
09:27:33.139 DEBUG: ‘SonarTS Coverage’ skipped because there is no related file in current project
09:27:33.139 DEBUG: ‘Import of TSLint issues’ skipped because one of the required properties is missing
09:27:33.139 DEBUG: ‘VB.NET Properties’ skipped because there is no related file in current project
09:27:33.140 DEBUG: ‘SonarSwift’ skipped because there is no related file in current project
09:27:33.140 DEBUG: ‘Import of SwiftLint issues’ skipped because there is no related file in current project
09:27:33.140 DEBUG: ‘gcov’ skipped because there is no related file in current project
09:27:33.140 DEBUG: ‘llvm-cov’ skipped because there is no related file in current project
09:27:33.141 DEBUG: ‘cppunit’ skipped because there is no related file in current project
09:27:33.141 DEBUG: ‘VisualStudioCoverage’ skipped because there is no related file in current project
09:27:33.141 DEBUG: ‘bullseye’ skipped because there is no related file in current project
09:27:33.141 DEBUG: ‘Python Squid Sensor’ skipped because there is no related file in current project
09:27:33.141 DEBUG: ‘Cobertura Sensor for Python coverage’ skipped because there is no related file in current project
09:27:33.142 DEBUG: ‘PythonXUnitSensor’ skipped because there is no related file in current project
09:27:33.142 DEBUG: ‘PylintSensor’ skipped because there is no related file in current project
09:27:33.142 DEBUG: ‘PylintImportSensor’ skipped because there is no related file in current project
09:27:33.142 DEBUG: ‘Import of Bandit issues’ skipped because there is no related file in current project
09:27:33.142 DEBUG: ‘SonarGo’ skipped because there is no related file in current project
09:27:33.143 DEBUG: ‘Go Unit Test Report’ skipped because there is no related file in current project
09:27:33.143 DEBUG: ‘Go Cover sensor for Go coverage’ skipped because one of the required properties is missing
09:27:33.143 DEBUG: ‘Import of go vet issues’ skipped because there is no related file in current project
09:27:33.143 DEBUG: ‘Import of Golint issues’ skipped because there is no related file in current project
09:27:33.143 DEBUG: ‘Import of GoMetaLinter issues’ skipped because there is no related file in current project
09:27:33.143 DEBUG: ‘Import of GolangCI-Lint issues’ skipped because there is no related file in current project
09:27:33.144 DEBUG: ‘Kotlin Sensor’ skipped because there is no related file in current project
09:27:33.144 DEBUG: ‘Import of detekt issues’ skipped because there is no related file in current project
09:27:33.144 DEBUG: ‘Import of Android Lint issues’ skipped because one of the required properties is missing
09:27:33.144 DEBUG: ‘T-SQL Sensor’ skipped because there is no related file in current project
09:27:33.144 DEBUG: ‘SonarJS’ skipped because there is no related file in current project
09:27:33.144 DEBUG: ‘ESLint-based SonarJS’ skipped because there is no related file in current project
09:27:33.145 DEBUG: ‘SonarJS Coverage’ skipped because there is no related file in current project
09:27:33.145 DEBUG: ‘Import of ESLint issues’ skipped because one of the required properties is missing
09:27:33.145 DEBUG: ‘Ruby Sensor’ skipped because there is no related file in current project
09:27:33.145 DEBUG: ‘Import of RuboCop issues’ skipped because one of the required properties is missing
09:27:33.145 DEBUG: ‘SimpleCov Sensor for Ruby coverage’ skipped because there is no related file in current project
09:27:33.145 DEBUG: ‘PHP sensor’ skipped because there is no related file in current project
09:27:33.145 DEBUG: ‘Analyzer for “php.ini” files’ skipped because there is no related file in current project
09:27:33.146 DEBUG: ‘AbapSquidSensor’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘Generic Coverage Report’ skipped because one of the required properties is missing
09:27:33.148 DEBUG: ‘Generic Test Executions Report’ skipped because one of the required properties is missing
09:27:33.148 DEBUG: ‘C#’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘C# Tests Coverage Report Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘[Deprecated] C# Integration Tests Coverage Report Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘C# Unit Test Results Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘VB.NET’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘VB.NET Tests Coverage Report Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘[Deprecated] VB.NET Integration Tests Coverage Report Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘VB.NET Unit Test Results Import’ skipped because there is no related file in current project
09:27:33.148 DEBUG: ‘CFamily’ skipped because there is no related file in current project
09:27:33.149 DEBUG: Sensors : JavaXmlSensor -> JaCoCo XML Report Importer -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor
09:27:33.149 INFO: Sensor JavaXmlSensor [java]
09:27:33.150 INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
09:27:33.150 INFO: Sensor JaCoCo XML Report Importer [jacoco]
09:27:33.154 DEBUG: No reports found
09:27:33.154 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
09:27:33.154 INFO: Sensor JavaSecuritySensor [security]
09:27:33.155 INFO: Reading type hierarchy from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\ucfg2\java
09:27:33.155 INFO: Read 0 type definitions
09:27:33.157 INFO: Reading UCFGs from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\ucfg2\java
09:27:33.158 INFO: No UCFGs have been included for analysis.
09:27:33.158 INFO: Sensor JavaSecuritySensor [security] (done) | time=4ms
09:27:33.158 INFO: Sensor CSharpSecuritySensor [security]
09:27:33.158 INFO: Reading type hierarchy from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration\ucfg_cs2
09:27:33.158 INFO: Read 0 type definitions
09:27:33.158 INFO: Reading UCFGs from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration\ucfg_cs2
09:27:33.158 INFO: No UCFGs have been included for analysis.
09:27:33.158 INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
09:27:33.158 INFO: Sensor PhpSecuritySensor [security]
09:27:33.158 INFO: Reading type hierarchy from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\ucfg2\php
09:27:33.158 INFO: Read 0 type definitions
09:27:33.158 INFO: Reading UCFGs from: C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\ucfg2\php
09:27:33.158 INFO: No UCFGs have been included for analysis.
09:27:33.158 INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
09:27:33.162 INFO: ------------- Run sensors on project
09:27:33.164 DEBUG: ‘Java CPD Block Indexer’ skipped because there is no related file in current project
09:27:33.164 DEBUG: Sensors : Zero Coverage Sensor
09:27:33.165 INFO: Sensor Zero Coverage Sensor
09:27:33.165 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
09:27:33.167 INFO: CPD Executor Calculating CPD for 0 files
09:27:33.168 INFO: CPD Executor CPD calculation finished (done) | time=0ms
09:27:33.187 DEBUG: readpipe [git, --version],C:\Program Files\Git\mingw64\bin
09:27:33.199 DEBUG: readpipe may return ‘git version 2.20.1.windows.1’
09:27:33.199 DEBUG: remaining output:

09:27:33.199 DEBUG: readpipe [git, config, --system, --edit],C:\Program Files\Git\mingw64\bin
09:27:33.218 DEBUG: readpipe may return ‘C:/Program Files/Git/mingw64/etc/gitconfig’
09:27:33.218 DEBUG: remaining output:

09:27:33.284 INFO: Analysis report generated in 116ms, dir size=131 KB
09:27:33.294 INFO: Analysis report compressed in 10ms, zip size=17 KB
09:27:33.294 INFO: Analysis report generated in C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\scanner-report
09:27:33.294 DEBUG: Upload report
09:27:33.775 DEBUG: POST 200 http://oursonarqube001:8765/api/ce/submit?projectKey=MobilePlannerProject&projectName=MobilePlanner%20C%2B%2B%20Project | time=480ms
09:27:33.777 INFO: Analysis report uploaded in 483ms
09:27:33.779 INFO: ANALYSIS SUCCESSFUL, you can browse http://oursonarqube001/dashboard?id=MobilePlannerProject
09:27:33.779 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
09:27:33.780 INFO: More about the report processing at http://oursonarqube001/api/ce/task?id=AXAgDFhu9LJqaPyzMRTz
09:27:33.781 DEBUG: Report metadata written to C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration.scannerwork\report-task.txt
09:27:33.785 DEBUG: Post-jobs :
09:27:33.788 INFO: Analysis total time: 25.461 s
09:27:33.792 INFO: ------------------------------------------------------------------------
09:27:33.792 INFO: EXECUTION SUCCESS
09:27:33.792 INFO: ------------------------------------------------------------------------
09:27:33.792 INFO: Total time: 27.777s
09:27:33.883 INFO: Final Memory: 21M/80M
09:27:33.884 INFO: ------------------------------------------------------------------------

C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>if ERRORLEVEL 1 goto error

C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>goto end

C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>goto exit

C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>call :returncode 0

C:\Jenkins\jobs\workspace\27-sonarqube-jenkins-integration>exit /B 0

Hello @phendley,

Yes, the scanner didn’t find any cpp files.

No, we don’t need to find the obj files.

If you look at the log:

It seems that you are configuring inclusions and exclusions options that causing the scanner not to find the files. From the log, I believe you are doing in the config files something like:
sonar.inclusions=**/Aria/src/*.cpp, **/Aria/ArNetworking/include/*.h, **/Aria/ArNetworking/src/*.cpp, **/Aria/ArQ/include/*/*.h, **/Aria/ArQ/src/*/*.cpp, **/Clients/Editor/include/*/*.h, **/Clients/Editor/src/*/*.h

sonar.exclusions=*.ts, moc_*

By the way, you are using one asterisk instead of two for subdirectories. For more information, you can have a look at the documentation.

Hello Abbas.
Thank you for the feedback. Good call on using two asterisk for my exclusions.

As for the sonar.inclusions property setting, I did not have that property explicitly set in my sonar-project.properties file. Instead I was setting the inclusions in my sonarqube server. I saw my “Source File Inclusions” getting referenced in the sonar-scanner.bat output so I just assumed they were being used. Turns out, they were found but NOT used. By simply adding the same inclusion entries in my sonar-project.properties as you showed above with the “sonar.inclusions=…” property, it started working. (At least it looks to be working now as it is running through all the source).

I’m not sure why I needed to explicitly add “sonar.inclusions=…” into my sonar-project.properties if my inclusions were specified in the sonarqube server AND they appeared to be recognized and listed in my sonar-scanner.bat output. I could definitely see inclusion files I that enterred into http://sonarqube’s “General Settings”–>“Source File Inclusions” field) listed in my console output…they just never seemed to get used for indexing files.

Regardless, your tip above worked - Thank you Abbas!

@phendley Glad it worked.

I believe they were being used, but since they were badly written they didn’t match any files.
Just out of curiosity, did you try to keep them on the server and fix them by adding double asterisk?
for example **/Aria/ArQ/src/**/*.cpp instead of **/Aria/ArQ/src/*/*.cpp

Hi Abbas.

I did try mucking with inclusion file paths on the server side a bit but had no luck. Admittedly, I did NOT try using the ** as noted in your example.
So, for the **/Aria/ArQ/src/**/*.cpp versus **/Aria/ArQ/src/*/*.cpp, I’ll give that a try but the proper directory I want to scan only has 1 level of directories under src
(e.g. Aria/ArQ/src/fooDir/MyClass.cpp )
In such a case, I’d expect a single * to work but I will give your suggestion of ** a try.
. . . trying your suggestion . . .
Okay, I just tried your suggestion (using **) as noted in your example above. It did not work but I can tell the Included files were read from the server as noted in the following console output line:
. . .
Included sources: /Aria/src//.cpp, /Aria/ArNetworking/include//.h, **/Aria/ArNetworking/src/.cpp, /Aria/ArQ/includ e//.h, /Aria/ArQ/src//.cpp, /Clients/Editor/include//.h, /Clients/Editor/src//.h*

As it stand now, I do have a working solution so thank you again for the help Abbas.
paul