Skip to content

Commit 332aec0

Browse files
SQCPPGHA-13 Use unified sonarqube-scan-action
1 parent 9961dcb commit 332aec0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
18-
- name: Install sonar-scanner
19-
uses: sonarsource/sonarcloud-github-c-cpp@v3
2018
- name: Install Ninja
2119
run: |
2220
wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
@@ -33,10 +31,12 @@ jobs:
3331
-DCMAKE_CXX_COMPILER_CLANG_SCAN_DEPS=clang-scan-deps-${{env.CLANG_VERSION}}
3432
# The project needs to be built so the `.modmap` files are generated
3533
cmake --build build --target all
36-
- name: Run sonar-scanner
34+
- name: SonarQube Scan
35+
uses: SonarSource/sonarqube-scan-action@v4
3736
env:
3837
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3938
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your token here
40-
run: |
41-
# Set the property "sonar.cfamily.compile-commands" to the compilation database file
42-
sonar-scanner --define sonar.cfamily.compile-commands=build/compile_commands.json
39+
with:
40+
args: >
41+
# Set the property "sonar.cfamily.compile-commands" to the compilation database file
42+
--define sonar.cfamily.compile-commands=build/compile_commands.json

0 commit comments

Comments
 (0)