Hi community
I’m trying to use Sonarqube with xcode to check swift code
Sonarqube server is working fine and I was able to ran scanner for the xcode project
But when I’m running the scanner , I keep seeing this on the server :
The main branch of this project is empty.
Below, I’m attaching some of the printed logs in the terminal and after it I’m sharing sonar-project keys
Logs :
INFO: SonarScanner 4.8.0.2856
INFO: Java 11.0.17 Eclipse Adoptium (64-bit)
INFO: Mac OS X 12.5 x86_64
INFO: User cache: /Users/user/.sonar/cache
INFO: Analyzing on SonarQube server 9.9.0.65466
INFO: Default locale: "en_PS", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=74ms
INFO: Server id: 147B411E-AYaSuBRI9Ra45onsIw_Z
INFO: User cache: /Users/user/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=46ms
INFO: Load/download plugins (done) | time=173ms
INFO: Process project properties
INFO: Process project properties (done) | time=11ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: com.test.project
INFO: Base dir: /Users/user/Test/Test
INFO: Working dir: /Users/user/Test/Test/.scannerwork
INFO: Load project settings for component key: 'com.test.project'
INFO: Load project settings for component key: 'com.test.project' (done) | time=20ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=126ms
INFO: Load active rules
INFO: Load active rules (done) | time=1124ms
INFO: Load analysis cache
INFO: Load analysis cache (404) | time=6ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=13ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: **/*.xml, Pods/**/*, Reports/**/*, *.swift
INFO: Included tests: *.swift
INFO: 547 files indexed
INFO: 193 files ignored because of inclusion/exclusion patterns
INFO: 23 files ignored because of scm ignore settings
INFO: Quality profile for json: Sonar way
INFO: ------------- Run sensors on module Test porject
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=49ms
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=5ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=149ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=55ms
INFO: Sensor CSS Rules [javascript]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=2ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=14ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=4ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: 378 source files to be analyzed
INFO: 378/378 source files have been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=953ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=10ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=28ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=91ms
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=1ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=13ms
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 121ms, dir size=122.4 kB
INFO: Analysis report compressed in 21ms, zip size=14.9 kB
INFO: Analysis report uploaded in 34ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: http://localhost:9000/dashboard?id=com.test.project
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AYajdpqZKKP99KntDkGL
INFO: Analysis total time: 6.691 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 8.761s
INFO: Final Memory: 17M/70M
sonar-project :
sonar.host.url=http://localhost:9000
# sonar.login=admin
# sonar.password=admin
sonar.projectKey=com.test.project
sonar.projectName=Test Project
sonar.swift.project=Test.xcodeproj
sonar.swift.workspace=Test.xcworkspace
# Number version (can be found automatically in plist, just comment this line)
sonar.projectVersion=1.0
sonar.language=swift
sonar.projectDescription=Project Description
sonar.sources=Test
sonar.swift.simulator=platform=iOS Simulator,name=iPhone 8,OS=13.0
sonar.swift.appName=Test
sonar.swift.appScheme=Test
sonar.sourceEncoding=UTF-8
sonar.swift.excludedPathsFromCoverage=.*Tests.*
sonar.sources=Test