fix workflow: remove github dependency + duplicate scan
SonarQube Code Quality Scan / scan (push) Successful in 27s
SonarQube Code Quality Scan / scan (push) Successful in 27s
This commit is contained in:
@@ -29,15 +29,17 @@ jobs:
|
|||||||
dotnet restore
|
dotnet restore
|
||||||
dotnet build --configuration Release
|
dotnet build --configuration Release
|
||||||
|
|
||||||
# 修复语法后的扫描步骤
|
# 官方标准.NET扫描流程(替换原步骤)
|
||||||
- name: Run SonarQube Scan
|
- name: Run SonarQube Scan (Official .NET Flow)
|
||||||
run: |
|
run: |
|
||||||
sonar-scanner `
|
dotnet tool install --global dotnet-sonarscanner
|
||||||
-Dsonar.projectKey=sqp_28b681b0124003c4393fa03c0a336875539e22c2 `
|
dotnet sonarscanner begin `
|
||||||
-Dsonar.sources=./ `
|
/k:"sqp_28b681b0124003c4393fa03c0a336875539e22c2" `
|
||||||
-Dsonar.host.url=http://127.0.0.1:9000 `
|
/d:sonar.host.url="http://127.0.0.1:9000" `
|
||||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} `
|
/d:sonar.login="${{ secrets.SONAR_TOKEN }}" `
|
||||||
-Dsonar.language=csharp `
|
/d:sonar.sources="./" `
|
||||||
-Dsonar.dotnet.build.directory=./**/bin/Release `
|
/d:sonar.language="csharp" `
|
||||||
-Dsonar.exclusions=**/obj/**,**/bin/Debug/** `
|
/d:sonar.exclusions="**/obj/**,**/bin/Debug/**" `
|
||||||
-Dsonar.coverage.exclusions=**/Test/**,**/*.Tests.cs
|
/d:sonar.coverage.exclusions="**/Test/**,**/*.Tests.cs"
|
||||||
|
dotnet build --configuration Release
|
||||||
|
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||||
Reference in New Issue
Block a user