SonarCloud Analysis via Codemagic CI/CD Not Detecting Changes in GitHub PRs

Hi Ann,

Thank you for your response. Your insight regarding the checkout process being a likely culprit was spot on!

The issue turned out to stem from how Codemagic checks out the repository for PR builds. It was checking out the main branch and then merging my PR branch changes into main.

I followed the setup as outlined here and reviewed other Codemagic documentation but didn’t find specifics on customizing the checkout process. So, I updated the codemagic.yaml scripts to include git reset --hard origin/main before running the scanner, and now the PR analysis is successfully picking up all the new changes!

Thank you so much for the quick response and guidance!

1 Like