GitHub Action - SonarCloud Code Analysis issues

Template for a good new topic, formatted with Markdown:

  • ALM used: GitHub
  • CI system used: GitHub Actions
  • Scanner command used when applicable: sonarsource/sonarcloud-github-action@master
  • Languages of the repository: JavaScript, TypeScript, React

I have a config file for sonarcloud however the action I’m using in GitHub requires it to be, is there any way around this? It’s very unintuitive to have two config files.

GitHub Action configuration

    name: SonarCloud Scan
    runs-on: ubuntu-latest
    needs: [unit-tests]

      - name: Checkout source code
        uses: actions/checkout@v2
          ref: ${{ github.sha }}

      - name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@master
          GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Hi Matt,

Since you are using a CI-based analysis (GitHub actions) you should not have a file at all. This file is used only for automatic analysis.
In your case you need to use a file (not as you write above. There’s no leading dot)

Hope this helps.

Thanks, that helps and I’ve been able to remove the additional config file.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.