The scan completes successfully, but is not scanning any of my 'C' source code

22:17:40.906 INFO  Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
22:17:40.917 INFO  Project root configuration file: NONE
22:17:40.940 INFO  SonarScanner CLI 6.2.1.4610
22:17:40.943 INFO  Java 17.0.12 Amazon.com Inc. (64-bit)
22:17:40.944 INFO  Linux 6.8.0-1021-aws amd64
22:17:40.984 INFO  User cache: /opt/sonar-scanner/.sonar/cache
22:17:42.793 INFO  JRE provisioning: os[linux], arch[x86_64]
22:17:46.833 INFO  Communicating with SonarQube Server 10.6.0.92116
22:17:47.349 INFO  Starting SonarScanner Engine...
22:17:47.352 INFO  Java 17.0.11 Eclipse Adoptium (64-bit)
22:17:48.977 INFO  Load global settings
22:17:49.262 INFO  Load global settings (done) | time=287ms
22:17:49.268 INFO  Server id: 3F3697CA-AZGAm0Zyp3QKDeUXJ9ff
22:17:49.283 INFO  Loading required plugins
22:17:49.284 INFO  Load plugins index
22:17:49.317 INFO  Load plugins index (done) | time=34ms
22:17:49.318 INFO  Load/download plugins
22:17:50.961 INFO  Load/download plugins (done) | time=1641ms
22:17:51.081 INFO  Loaded core extensions: developer-scanner
22:17:51.492 INFO  Process project properties
22:17:51.494 INFO  Process project properties (done) | time=2ms
22:17:51.508 INFO  Project key: Brake_Controller_Example:sonarqube-integration
22:17:51.511 INFO  Base dir: /usr/src
22:17:51.514 INFO  Working dir: /tmp/.scannerwork
22:17:51.530 INFO  Load project settings for component key: 'Brake_Controller_Example:sonarqube-integration'
22:17:51.563 INFO  Load project settings for component key: 'Brake_Controller_Example:sonarqube-integration' (done) | time=36ms
22:17:51.610 INFO  Load project branches
22:17:51.648 INFO  Load project branches (done) | time=37ms
22:17:51.649 INFO  Load branch configuration
22:17:51.652 INFO  Load branch configuration (done) | time=4ms
22:17:51.675 INFO  Load quality profiles
22:17:51.767 INFO  Load quality profiles (done) | time=92ms
22:17:51.822 WARN  SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings.
22:17:51.828 INFO  Load active rules

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Welcome to the community!

Please provide the full analysis log, starting from the analysis command itself.

Also, what edition of SonarQube are you using?

And finally, your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

10.6 → 2025.1

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

 
Ann

that is the full log from my ci/cd pipeline, but here is the first line:
docker run --rm --env-file $(System.DefaultWorkingDirectory)/sonarqube.env sonarsource/sonar-scanner-cli -Dsonar.projectKey=Brake_Controller_Example:main

Hi,

So the log ends at

?

 
Ann

My apologies Ann, I went back and double checked, and it looks like the log was truncated when I copied and pasted it, please find the log attached. Also, this is the command I am using to trigger the scan:

sudo docker run --rm --env-file sonarqube.env sonarsource/sonar-scanner-cli -Dsonar.projectKey=Brake_Controller_Example -Dsonar.scm.disabled=true -X

Thanks,
Jean
sonar-scanner.log (30.3 KB)

Hi,

Your title indicates that analysis completes successfully, but that’s not what’s shown in your log:

2025-02-18T19:31:05.1567759Z 19:31:05.155 ERROR Not inside a Git work tree: /usr/src
2025-02-18T19:31:05.1569501Z org.sonar.api.utils.MessageException: Not inside a Git work tree: /usr/src
2025-02-18T19:31:05.1569690Z 
2025-02-18T19:31:05.1678226Z 19:31:05.167 DEBUG Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$355/0x0000786a602ad200@6f8e0cee during JVM shutdown
2025-02-18T19:31:05.1905183Z 19:31:05.189 DEBUG Java command exited with code 1
2025-02-18T19:31:05.1905672Z 19:31:05.189 INFO  EXECUTION FAILURE

 
Ann