1
votes

I am having a Xcode Project for which I am running SonarQube Analyzer. It is getting analyzed successfully for main Project but my problem is Sonar Qube is unable to analyzed dependency projects like Pods or Frameworks. So is there is anyway to include Pods or Frameworks too.

Here is the data of my sonar properties file for which I am using for running Sonar.

sonar.projectKey=PROJECT_IDENTIFIER

sonar.projectName=PROJECT_NAME

sonar.projectVersion=VERSION   sonar.sources=./PRODUCT_NAME

sonar.inclusions=**/*.m, **/*.h, **/*.swift

Thanks in advance...

2
It's not a good idea to include Frameworks or Pods code to get analyzed with the code you've written. It will dilute the results. There may be an external library which you are using may have the very old code and might have many codes smells etc. So, not a good idea. But, if you really want to then you can use sonar.sources key to defining the path of code to be analyzed.Vighnesh Pai
@Hyder : Can you please share the article or link you follow for Sonar Qube integration with swift.Saggy

2 Answers

1
votes

You can simply use the sonar.sources=. which will analyze all the files and directory in project root directory

1
votes

Use sonar.inclusions= & add paths of directories of your project. Also see the pattern of paths handling in below link. Example,

sonar.inclusions=<RootDirectoryName>/**/*

comment sonar.source line in property in case above line doesn't work at first.

https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/