Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addin should work with dotnet-sonarscanner package #13

Open
savornicesei opened this issue Jul 26, 2021 · 0 comments
Open

Addin should work with dotnet-sonarscanner package #13

savornicesei opened this issue Jul 26, 2021 · 0 comments

Comments

@savornicesei
Copy link

Hi all,

Based on the addin source code, it does not work with dotnet-sonarscanner package because it does not provide a begin and end command like Cake.Sonar addin does.

The official GitHub Action for doing a SoanrQube analysis in sonarcloud.io contains these steps:

- name: Install SonarCloud scanner
        if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
        shell: powershell
        run: |
          New-Item -Path .\.sonar\scanner -ItemType Directory
          dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
      - name: Build and analyze
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        shell: powershell
        run: |
          .\.sonar\scanner\dotnet-sonarscanner begin /k:"project_key" /o:"organization" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
          <your clean build command>
          .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

I think a merge between this addin and the Cake.Sonar one to support both .NET core and .NET framework analysis along with nice and up2date SonarQube API parameters would be awesome.

Best,
Simo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant