Skip to content

Commit de48921

Browse files
committed
CPP-5241 Migrate github action from build-wrapper-output to compilation-database
1 parent 8a10879 commit de48921

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ jobs:
5555
uses: sonarsource/sonarcloud-github-c-cpp@v2
5656
- name: Run build-wrapper
5757
run: |
58-
#here goes your compilation wrapped with build-wrapper; See https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-steps-using-build-wrapper for more information
58+
# here goes your compilation wrapped with build-wrapper; See https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-steps-using-build-wrapper for more information
5959
# build-preparation steps
6060
# build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} build-command
6161
- name: Run sonar-scanner
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
65-
run: sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" #Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options
65+
run: sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" #Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options
6666
```
6767
6868
You can change the `build-wrapper` and `sonar-scanner` installation path by using the optional input `installation-path` like this:

0 commit comments

Comments
 (0)