I configured a Github Action to run SonarCloud against a .NET Core repo, action yaml is below, pretty much as per the example in the documentation here https://github.com/marketplace/actions/sonarcloud-scan.
jobs:
sonarCloudTrigger:
name: SonarCloud Trigger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- ALM used: GitHub
- CI system used: GitHub Actions
- Languages of the repository: C# (.NET Core)
- Error observed:
The error below happens when the action runs against my PR:
Then when I log into sonarcloud for that Project, it says:
The main branch has no lines of code.
The documentation suggests it’s not supported for .NET projects, but I saw an old post about this which suggested that it works.
Can anyone shed any light on this?
Thank you