SonarQube CE | The main branch has no lines of code. | Swift

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube: CE 9.5 (build 56709)
    Scanner: 4.7.0.2747
    Language: Swift

  • what are you trying to achieve
    Scan locally stored source code

  • what have you tried so far to achieve this
    I try to move to master branch and even create a fresh new branch without git. It is still showing the same error message: “The main branch has no lines of code”

However trying developer edition can scan the project but I still have not received the key yet.

My sonar.properties file
Screenshot 2022-07-01 at 4.16.43 PM

sonar.python.coverage.reportPaths=../coverage.xml
# unique project identifier (required)
sonar.projectKey=sonartest-1
# project metadata (used to be required, optional since SonarQube 6.1)
sonar.projectName=test
sonar.projectVersion=1.0
# path to source directories (required)
sonar.sources=./src
sonar.sources=src
# path to test source directories (optional)
#sonar.tests=tests

Hey there.

As Swift is only supported in Developer Edition and above, this is expected behavior. You’ll need to wait to receive your license key and install the right edition.

Oh ok. I should have asked earlier :smile:
Thanks! you save my day