Several header-only class files in my project are not recognized as class

Several header-only class files in my project are not recognized as class and have no lines to cover.

  • ALM used: GitHub
  • CI system used: GitHub Actions
- name: SonarQube Scan
  uses: SonarSource/sonarqube-scan-action@v4.2.1
  env:
    SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
  • Scanner properties file:
sonar.projectKey=XXX
sonar.organization=XXX

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=Project6
sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=Source,Include
sonar.tests=Tests

sonar.cfamily.compile-commands=build/compile_commands.json
sonar.cfamily.cobertura.reportPaths=UnitTestsCoverage.xml

sonar.scm.disabled=true

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
  • Languages of the repository: C/C++/CMake
  • Logs:
sonar-scanner.bat

[62](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:67)12:03:47.227 INFO Scanner configuration file: D:\a\_temp\sonar-scanner-cli-6.2.1.4610-Windows-X64\bin\..\conf\sonar-scanner.properties

[63](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:68)12:03:47.242 INFO Project root configuration file: D:\a\Project6\Project6\sonar-project.properties

[64](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:69)12:03:47.258 INFO SonarScanner CLI 6.2.1.4610

[65](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:70)12:03:47.273 INFO Java 17.0.12 Eclipse Adoptium (64-bit)

[66](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:71)12:03:47.273 INFO Windows Server 2022 10.0 amd64

[67](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:72)12:03:47.289 INFO User cache: C:\Users\runneradmin\.sonar\cache

[68](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:73)12:03:52.574 INFO JRE provisioning: os[windows], arch[amd64]

[69](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:74)12:03:57.673 INFO Communicating with SonarCloud

[70](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:75)12:03:58.135 INFO Starting SonarScanner Engine...

[71](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:76)12:03:58.135 INFO Java 17.0.11 Eclipse Adoptium (64-bit)

[72](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:77)12:04:00.207 INFO Load global settings

[73](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:78)12:04:01.023 INFO Load global settings (done) | time=817ms

[74](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:79)12:04:01.030 INFO Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu

[75](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:80)12:04:02.069 INFO Loading required plugins

[76](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:81)12:04:02.070 INFO Load plugins index

[77](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:82)12:04:02.254 INFO Load plugins index (done) | time=183ms

[78](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:83)12:04:02.256 INFO Load/download plugins

[79](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:84)12:04:03.310 INFO Load/download plugins (done) | time=1054ms

[80](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:85)12:04:03.881 INFO Found an active CI vendor: 'Github Actions'

[81](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:86)12:04:03.897 INFO Load project settings for component key: 'tomas-pinto_Project6'

[82](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:87)12:04:04.084 INFO Load project settings for component key: 'tomas-pinto_Project6' (done) | time=187ms

[83](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:88)12:04:04.092 INFO Process project properties

[84](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:89)12:04:04.100 INFO Project key: tomas-pinto_Project6

[85](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:90)12:04:04.101 INFO Base dir: D:\a\Project6\Project6

[86](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:91)12:04:04.106 INFO Working dir: D:\a\Project6\Project6\.scannerwork

[87](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:92)12:04:04.118 INFO Load project branches

[88](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:93)12:04:04.348 INFO Load project branches (done) | time=229ms

[89](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:94)12:04:04.351 INFO Check ALM binding of project 'tomas-pinto_Project6'

[90](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:95)12:04:04.518 INFO Detected project binding: BOUND

[91](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:96)12:04:04.519 INFO Check ALM binding of project 'tomas-pinto_Project6' (done) | time=168ms

[92](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:97)12:04:04.520 INFO Load project pull requests

[93](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:98)12:04:04.756 INFO Load project pull requests (done) | time=236ms

[94](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:99)12:04:04.759 INFO Load branch configuration

[95](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:100)12:04:04.761 INFO Github event: push

[96](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:101)12:04:04.764 INFO Auto-configuring branch master

[97](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:102)12:04:04.766 INFO Load branch configuration (done) | time=6ms

[98](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:103)12:04:04.778 INFO Load quality profiles

[99](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:104)12:04:05.057 INFO Load quality profiles (done) | time=278ms

[100](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:105)12:04:05.066 INFO Load active rules

[101](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:106)12:04:14.532 INFO Load active rules (done) | time=9466ms

[102](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:107)12:04:14.726 INFO Organization key: tomas-pinto

[103](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:108)12:04:14.727 INFO Branch name: master, type: long-lived

[104](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:109)12:04:14.766 INFO Preprocessing files...

[105](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:110)12:04:14.983 INFO 2 languages detected in 113 preprocessed files

[106](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:111)12:04:14.985 INFO 0 files ignored because of inclusion/exclusion patterns

[107](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:112)12:04:17.497 INFO Loading plugins for detected languages

[108](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:113)12:04:17.497 INFO Load/download plugins

[109](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:114)12:04:18.856 INFO Load/download plugins (done) | time=1357ms

[110](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:115)12:04:18.948 INFO Load project repositories

[111](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:116)12:04:19.185 INFO Load project repositories (done) | time=237ms

[112](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:117)12:04:19.189 INFO Indexing files...

[113](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:118)12:04:19.192 INFO Project configuration:

[114](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:119)12:04:19.194 INFO Excluded sources: **/build-wrapper-dump.json

[115](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:120)12:04:19.229 INFO 113 files indexed

[116](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:121)12:04:19.239 INFO Quality profile for c: Sonar way

[117](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:122)12:04:19.241 INFO Quality profile for cpp: Sonar way

[118](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:123)12:04:19.242 INFO ------------- Run sensors on module Project6

[119](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:124)12:04:19.285 INFO Load metrics repository

[120](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:125)12:04:19.468 INFO Load metrics repository (done) | time=185ms

[121](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:126)12:04:19.476 INFO Sensor cache enabled

[122](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:127)12:04:20.327 INFO Load sensor cache

[123](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:128)12:04:22.008 INFO Load sensor cache (66 KB) | time=1679ms

[124](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:129)12:04:22.434 INFO Sensor JaCoCo XML Report Importer [jacoco]

[125](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:130)12:04:22.437 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

[126](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:131)12:04:22.438 INFO No report imported, no coverage information will be imported by JaCoCo XML Report Importer

[127](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:132)12:04:22.439 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms

[128](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:133)12:04:22.440 INFO Sensor Java Config Sensor [iac]

[129](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:134)12:04:22.478 INFO 0 source files to be analyzed

[130](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:135)12:04:22.488 INFO 0/0 source files have been analyzed

[131](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:136)12:04:22.490 INFO Sensor Java Config Sensor [iac] (done) | time=48ms

[132](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:137)12:04:22.491 INFO Sensor IaC Docker Sensor [iac]

[133](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:138)12:04:22.627 INFO 0 source files to be analyzed

[134](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:139)12:04:22.632 INFO 0/0 source files have been analyzed

[135](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:140)12:04:22.632 INFO Sensor IaC Docker Sensor [iac] (done) | time=141ms

[136](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:141)12:04:22.633 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise]

[137](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:142)12:04:22.633 INFO Available processors: 2

[138](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:143)12:04:22.634 INFO Using 2 threads for analysis.

[139](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:144)12:04:23.549 INFO Using git CLI to retrieve untracked files

[140](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:145)12:04:24.591 INFO Analyzing language associated files and files included via "sonar.text.inclusions" that are tracked by git

[141](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:146)12:04:24.767 INFO 111 source files to be analyzed

[142](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:147)12:04:25.636 INFO 111/111 source files have been analyzed

[143](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:148)12:04:25.637 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise] (done) | time=3005ms

[144](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:149)12:04:25.638 INFO Sensor CFamily [cpp]

[145](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:150)12:04:25.704 INFO CFamily plugin version: 6.62.0.78645 (829eaa25b0b1054f587bbeeb168e51409c72f905)

[146](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:151)12:04:25.706 INFO CFamily analysis configuration mode: Compile-Commands

[147](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:152)12:04:25.713 INFO Using compile commands: D:\a\Project6\Project6\build\compile_commands.json

[148](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:153)12:04:25.716 INFO Available processors: 2

[149](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:154)12:04:25.721 INFO Using 2 threads for analysis.

[150](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:155)12:04:27.869 INFO Loading cache from: server

[151](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:156)12:04:28.359 INFO Trying to deduce "INCLUDE" environment variable from C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1442~1.344\bin\Hostx64\x64\cl.exe

[152](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:157)12:04:30.433 INFO Ignore unknown compiler: C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0A00 -I D:\a\Project6\Project6\Include -I D:\a\Project6\Project6\LibsVendor\DirectXTex\Common -I D:\a\Project6\Project6\LibsVendor\DirectXTex\DirectXTex -DWIN32 /fo LibsVendor\DirectXTex\CMakeFiles\texassemble.dir\Texassemble\texassemble.rc.res D:\a\Project6\Project6\LibsVendor\DirectXTex\Texassemble\texassemble.rc

[153](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:158)12:04:30.449 INFO Ignore unknown compiler: C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0A00 -I D:\a\Project6\Project6\Include -I D:\a\Project6\Project6\LibsVendor\DirectXTex\Common -I D:\a\Project6\Project6\LibsVendor\DirectXTex\DirectXTex -DWIN32 /fo LibsVendor\DirectXTex\CMakeFiles\texconv.dir\Texconv\Texconv.rc.res D:\a\Project6\Project6\LibsVendor\DirectXTex\Texconv\Texconv.rc

[154](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:159)12:04:30.454 INFO Ignore unknown compiler: C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0A00 -I D:\a\Project6\Project6\Include -I D:\a\Project6\Project6\LibsVendor\DirectXTex\Common -I D:\a\Project6\Project6\LibsVendor\DirectXTex\DirectXTex -DWIN32 /fo LibsVendor\DirectXTex\CMakeFiles\texdiag.dir\Texdiag\texdiag.rc.res D:\a\Project6\Project6\LibsVendor\DirectXTex\Texdiag\texdiag.rc

[155](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:160)12:04:30.456 INFO Ignore unknown compiler: C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0A00 -I D:\a\Project6\Project6\Include -I D:\a\Project6\Project6\build\LibsVendor\DirectXTex\Shaders\Compiled -I D:\a\Project6\Project6\LibsVendor\DirectXTex\DirectXTex -DWIN32 /fo LibsVendor\DirectXTex\CMakeFiles\ddsview.dir\DDSView\DDSView.rc.res D:\a\Project6\Project6\LibsVendor\DirectXTex\DDSView\DDSView.rc

[156](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:161)12:04:30.511 INFO Ignore unknown compiler: C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0602 -I D:\a\Project6\Project6\Include -I D:\a\Project6\Project6\LibsVendor\DirectXTK\Audio -I D:\a\Project6\Project6\LibsVendor\DirectXTK\Src -DWIN32 /fo LibsVendor\DirectXTK\CMakeFiles\xwbtool.dir\XWBTool\xwbtool.rc.res D:\a\Project6\Project6\LibsVendor\DirectXTK\XWBTool\xwbtool.rc

[157](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:162)12:04:30.522 INFO Detected compilers: cl=125;rc=5

[158](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:163)12:04:30.523 INFO Number of compilation units in the provided Compilation Database: 130

[159](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:164)12:04:30.525 INFO Number of skipped unsupported compilation units: 5

[160](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:165)12:04:30.525 INFO Number of skipped non-indexed compilation units: 89

[161](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:166)12:04:30.526 INFO Number of skipped duplicate compilation units: 0

[162](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:167)12:04:30.526 INFO Number of remaining compilation units to be analyzed: 36

[163](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:168)12:04:30.529 INFO Detected standards: c++20=36

[164](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:169)12:04:30.530 INFO Starting the analysis of 36 CFamily compilation units

[165](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:170)12:04:32.568 INFO [1/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\CameraComponent.cpp

[166](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:171)12:04:32.663 INFO [2/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\Component.cpp

[167](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:172)12:04:32.676 INFO [3/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\Entity.cpp

[168](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:173)12:04:32.698 INFO [4/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\FogComponent.cpp

[169](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:174)12:04:37.218 INFO [5/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\ImageComponent.cpp

[170](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:175)12:04:37.261 INFO [6/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\LightComponent.cpp

[171](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:176)12:04:37.272 INFO [7/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\MeshComponent.cpp

[172](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:177)12:04:37.281 INFO [8/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\PlayerControllerComponent.cpp

[173](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:178)12:04:37.290 INFO [9/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\SphereColliderComponent.cpp

[174](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:179)12:04:37.397 INFO [10/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\TerrainComponent.cpp

[175](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:180)12:04:37.427 INFO [11/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\TextComponent.cpp

[176](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:181)12:04:37.438 INFO [12/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\TransformComponent.cpp

[177](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:182)12:04:37.453 INFO [13/36] Cache hit for: D:\a\Project6\Project6\Source\Entity\WaterComponent.cpp

[178](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:183)12:04:37.483 INFO [14/36] Cache hit for: D:\a\Project6\Project6\Source\Game\Display.cpp

[179](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:184)12:04:37.497 INFO [15/36] Cache hit for: D:\a\Project6\Project6\Source\Game\Game.cpp

[180](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:185)12:04:37.512 INFO [16/36] Cache hit for: D:\a\Project6\Project6\Source\Game\World.cpp

[181](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:186)12:04:37.522 INFO [17/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\ConstantBuffer.cpp

[182](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:187)12:04:37.536 INFO [18/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\DeviceContext.cpp

[183](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:188)12:04:37.555 INFO [19/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\Font2D.cpp

[184](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:189)12:04:37.568 INFO [20/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\GraphicsEngine.cpp

[185](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:190)12:04:37.604 INFO [21/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\IndexBuffer.cpp

[186](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:191)12:04:37.779 INFO [22/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\PixelShader.cpp

[187](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:192)12:04:37.795 INFO [23/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\RenderSystem.cpp

[188](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:193)12:04:37.813 INFO [24/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\SwapChain.cpp

[189](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:194)12:04:37.829 INFO [25/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\Texture2D.cpp

[190](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:195)12:04:37.850 INFO [26/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\VertexBuffer.cpp

[191](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:196)12:04:37.865 INFO [27/36] Cache hit for: D:\a\Project6\Project6\Source\Graphics\VertexShader.cpp

[192](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:197)12:04:37.875 INFO [28/36] Cache hit for: D:\a\Project6\Project6\Source\Input\InputSystem.cpp

[193](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:198)12:04:37.884 INFO [29/36] Cache hit for: D:\a\Project6\Project6\Source\Physics\PhysicsEngine.cpp

[194](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:199)12:04:37.918 INFO [30/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\Font.cpp

[195](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:200)12:04:37.932 INFO [31/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\Material.cpp

[196](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:201)12:04:37.945 INFO [32/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\Mesh.cpp

[197](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:202)12:04:37.967 INFO [33/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\Resource.cpp

[198](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:203)12:04:37.984 INFO [34/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\ResourceManager.cpp

[199](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:204)12:04:37.997 INFO [35/36] Cache hit for: D:\a\Project6\Project6\Source\Resource\Texture.cpp

[200](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:205)12:04:38.008 INFO [36/36] Cache hit for: D:\a\Project6\Project6\Source\Window\Window.cpp

[201](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:206)12:04:38.099 INFO 106/106 files marked as unchanged

[202](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:207)12:04:38.099 INFO 5/5 test files marked as unchanged

[203](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:208)12:04:38.100 INFO Analysis cache: 36/36 hits, 186008 bytes

[204](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:209)12:04:38.100 INFO CFamily analysis done in: 12396ms

[205](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:210)12:04:38.100 INFO 36 compilation units were fully analyzed

[206](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:211)12:04:38.101 INFO 0 compilation units were partially analyzed: 0 stopped on Config, 0 stopped on Parsing, 0 stopped on AST, 0 stopped on SE, and 0 stopped on SE with PE

[207](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:212)12:04:38.101 INFO 45 rules with 'symbolic-execution' tag raised 2 out of 399 issues

[208](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:213)12:04:38.108 INFO Performance statistics per analysis stage (Total, Average, Percentage) across 36 compilation units:

[209](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:214)annotationStage: 3163ms, 87ms, 1.2%

[210](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:215)astRulesStage: 3523ms, 97ms, 1.34%

[211](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:216)configStage: 271ms, 7ms, 0.1%

[212](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:217)parsingStage: 229971ms, 6388ms, 87.41%

[213](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:218)symbolicExecutionStage: 26163ms, 726ms, 9.94%

[214](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:219)12:04:38.108 INFO PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 36 (forceInclude=0,throughHeader=0)

[215](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:220)12:04:38.109 INFO Z3 refutation rate: 0 out of 1

[216](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:221)12:04:38.109 INFO Percentage of files indexed with CFamily languages: 100% (C: 73, C++: 38, ObjC: 0, AnyLang: 111)

[217](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:222)12:04:38.112 INFO C and C++ analysis quality score: 100/100

[218](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:223)12:04:38.113 INFO Analysis measures statistics:

[219](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:224)100% of classes were parsed successfully (0 out of 53 have parsing errors)

[220](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:225)100% of functions were parsed successfully (0 out of 314 have parsing errors)

[221](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:226)100% of statements were parsed successfully (0 out of 1264 have parsing errors)

[222](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:227)100% of the project includes directives were resolved (0 out of 419 were not resolved)

[223](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:228)0 external includes directives were not resolved

[224](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:229)0 modules imports were not resolved

[225](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:230)0 header units were not resolved

[226](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:231)12:04:38.124 INFO Sensor CFamily [cpp] (done) | time=12486ms

[227](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:232)12:04:38.128 INFO ------------- Run sensors on project

[228](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:233)12:04:38.380 INFO Sensor cobertura [cpp]

[229](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:234)12:04:38.397 INFO Parsing D:\a\Project6\Project6\UnitTestsCoverage.xml

[230](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:235)12:04:38.455 INFO Sensor cobertura [cpp] (done) | time=74ms

[231](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:236)12:04:38.456 INFO Sensor Zero Coverage Sensor

[232](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:237)12:04:38.492 INFO Sensor Zero Coverage Sensor (done) | time=36ms

[233](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:238)12:04:38.494 INFO SCM Publisher is disabled

[234](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:239)12:04:38.511 INFO CPD Executor 6 files had no CPD blocks

[235](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:240)12:04:38.512 INFO CPD Executor Calculating CPD for 100 files

[236](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:241)12:04:38.562 INFO CPD Executor CPD calculation finished (done) | time=50ms

[237](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:242)12:04:47.290 INFO Analysis report generated in 8705ms, dir size=601 KB

[238](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:243)12:04:47.537 INFO Analysis report compressed in 246ms, zip size=279 KB

[239](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:244)12:04:48.503 INFO Analysis report uploaded in 964ms

[240](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:245)12:04:48.505 INFO ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=tomas-pinto_Project6&branch=master

[241](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:246)12:04:48.505 INFO Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report

[242](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:247)12:04:48.506 INFO More about the report processing at https://sonarcloud.io/api/ce/task?id=AZQsDcgvinbjIry0kM8e

[243](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:248)12:04:49.488 INFO Sensor cache published successfully

[244](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:249)12:04:49.575 INFO Analysis total time: 46.001 s

[245](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:250)12:04:49.576 INFO SonarScanner Engine completed successfully

[246](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:251)12:04:49.936 INFO EXECUTION SUCCESS

[247](https://github.com/tomas-pinto/Project6/actions/runs/12597375326/job/35110247051#step:9:252)12:04:49.936 INFO Total time: 1:02.709s

Hello @tomas-pinto,

According to SonarQube documentation:

Any file that doesn’t end up in a compiled compilation unit will not be analyzed. As a consequence, source files that are not compiled and header files that are not included in any compiled source file will not be analyzed.

This means that while header files may not appear as analysis files in the logs, but they are indeed analyzed as part of the source files if they are included. Conversely, if header files are not included, they will not be analyzed.

Thanks,

1 Like

Thank you for the answer! It is working now.
So I can assume that SonarQube doesn’t support analysis of a header-only library?

Hello,

To ensure that the analyzer processes the code the same way the build does, header files are analyzed in the context of the files that include them. Therefore, if a header-only library has unit tests for example, the library will be analyzed. However, if the library lacks source files either within the library itself or as unit tests, SonarQube will not analyze those header files due to the absence of translation units.

If that doesn’t align with your use case, could you please provide additional details about the use case, like the library structure, and the build process?

Thanks,

As per my project, if I try to include all the header files via a “All.h” file in a .cpp source file all of them will be analyzed and it works fine.

But if I include “All.h” in my UnitTests .cpp source file only the classes that are actually instantiated will get analyzed.

As part of my CMake build process I’m outputting the static library (.lib) and unit tests executable (.exe) which I’m using to compute the code coverage to SonarQube.

I can see the classes in SonarQube Scan runner job logs. Example:
18:09:03.071 DEBUG ‘AAA.h’ indexed with language ‘c’
18:09:08.490 DEBUG ‘AAA.h’ generated metadata with charset ‘windows-1252’
18:10:42.003 DEBUG D:\a\AAA.h not marked as unchanged: file content changed
And it even says: 18:09:10.499 INFO 111/111 source files have been analyzed

Note:
The only way I was able to make this work was to remove the tests folder from sonar.tests and put it in sonar.sources:
sonar.sources=Source,Include,Tests
#sonar.tests=Tests

This fixes the above problem but introduces another one because now my unit tests source files are being analyzed and are expected to have code coverage as well.

Also, I would say that the SonarQube Cloud frontend should be more informative about when a file is present, but it was not analyzed because it can lead to misleading conclusion.

Hi @tomas-pinto,

You are right that sonar.tests is not supported for C or C++ analysis. You can read more details here.

This is what we recommend to do.

You can exclude these files from code coverage.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.