SonarCloud - Swift code quality scan through GitHub actions

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps) : GitHub
  • CI system used : GitHub Actions
  • Scanner command used when applicable (private details masked)
  • Languages of the repository : Swift

I would like to understand, if there is any sample projects available for Swift iOS project scanning using SonarCloud through GitHub actions pipeline as I’m quite new to Swift but I know how this is being done for Java (maven/gradle). Because, based on the references it looks I have to follow only the steps similar to C,C++, Obj which includes build wrapper and downloading sonar scanner separately.

So I would like to understand if this is best approach to follow or do we any other alternate options available for Swift?

Also, this page appears to be unavailable,
https://sonarcloud.io/documentation/advanced-setup/languages/cfamily/#analysis-steps-using-compilation-database

Hey there.

If you are only analyzing Swift – there’s no need to use the build wrapper or compilation database. The tutorial in the UI for Other (for JS, TS, Go, Python, PHP, …) is all you need.

Can you let us know where you found this link?

Hi,

Thanks for the reply. The above link is available from the below configure page,