From 7665391919a37870cbf2700ddfc9f6d6322f3508 Mon Sep 17 00:00:00 2001 From: Antonio Aversa Date: Thu, 12 Dec 2024 15:01:22 +0100 Subject: [PATCH] Code review: improve README for use of "no Build Wrapper" vs "Build Wrapper" --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e8822e3..8512fc6 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,8 @@ sonar.sources=. ``` The workflow, usually declared under `.github/workflows`, looks like the following: -- for projects **not** written in C, C++, and Objective-C -- and for projects written in C, C++, and Objective-C and using [AutoConfig](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/analysis-modes/#choosing-the-right-analysis-mode) +- for projects that don't have C, C++, or Objective-C in them +- for C, C++, Objective-C projects that don't use [Build Wrapper](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/prerequisites/#using-buildwrapper) ```yaml on: @@ -73,7 +73,7 @@ jobs: SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} ``` -For C, C++ and Objective-C projects not using AutoConfig, the workflow requires additional steps to download the Build Wrapper and invoking it: +For C, C++, and Objective-C projects relying on [Build Wrapper](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/prerequisites/#using-buildwrapper) to generate the compilation database, the workflow requires additional steps to download the Build Wrapper and invoke it: ```yaml # Trigger analysis when pushing to your main branches, and when creating a pull request. @@ -118,7 +118,10 @@ jobs: #Consult https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options ``` -If you are using SonarQube Server 10.5 or earlier, use `sonar.cfamily.build-wrapper-output` instead of `sonar.cfamily.compile-commands` in the `run` property of the last step, as Build Wrapper does not generate a compile_commands.json file before SonarQube Server 10.6, like this: +If you are using SonarQube Server 10.5 or earlier, use `sonar.cfamily.build-wrapper-output` instead of `sonar.cfamily.compile-commands` in the `args` property of the last step, as Build Wrapper does not generate a `compile_commands.json` file before SonarQube Server 10.6. + +It should look like this: + ```yaml with: args: |