-
Notifications
You must be signed in to change notification settings - Fork 653
fix: Switch to compile-commands #4879
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
fix: Switch to compile-commands #4879
Conversation
This patch resolves SonarCloud analysis failures caused by a deprecated C/C++ property. It removes `sonar.cfamily.build-wrapper-output` from `sonar-project.properties` and updates the CI workflow to use `sonar.cfamily.compile-commands` pointing at `$BUILD_WRAPPER_OUT_DIR/compile_commands.json`. Validated locally with a fresh build-wrapper capture; the scan completed and uploaded successfully. Signed-off-by: Vanessa Valderrama <[email protected]>
|
There is something going wrong in the sonar analysis job. That's on me to fix, I will look at it today! This failure is happening during the build, and is entirely unrelated to both your patch and the previously reported Sonar issues (which, when I filed the ticket, finished the build fine and failed on the actual sonar analysis step itself). Something else must have broken. Stand by, I will get that fixed and then we can see if your patch cleared up the other situation. |
Signed-off-by: Larry Gritz <[email protected]>
|
I amended your PR with a fix that will let it get to the analysis step, avoiding the other spurious problem. But you can see that it still crashes in the sonar analysis, as I originally reported: |
lgritz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM and I will merge it, since it updates from a deprecated to a more modern way to communicate our intent to the command.
However, this doesn't actually make the sonar analysis succeed -- it still crashes somewhere in the sonar code itself.
Fix SonarCloud analysis failures by switching the C/C++ configuration from the deprecated `sonar.cfamily.build-wrapper-output` property to the current `sonar.cfamily.compile-commands` property. **Changes** - Remove `sonar.cfamily.build-wrapper-output` from `sonar-project.properties`. - In `.github/workflows/build-steps.yml`, pass `--define sonar.cfamily.compile-commands="$BUILD_WRAPPER_OUT_DIR/compile_commands.json"`. **Root cause** The SonarCloud config still used the deprecated `sonar.cfamily.build-wrapper-output` property. The current CFamily analyzer expects a `compile_commands.json` (produced by build-wrapper). Using the old property caused scanner failures and blocked analysis. **Validation** Regenerated `bw_output/compile_commands.json`, ran `sonar-scanner`, and confirmed the scan completed and uploaded successfully. **Tests** CI-only change. Verified locally by running the scanner against a fresh build-wrapper capture. --------- Signed-off-by: Vanessa Valderrama <[email protected]> Signed-off-by: Zach Lewis <[email protected]>
Fix SonarCloud analysis failures by switching the C/C++ configuration from the deprecated `sonar.cfamily.build-wrapper-output` property to the current `sonar.cfamily.compile-commands` property. **Changes** - Remove `sonar.cfamily.build-wrapper-output` from `sonar-project.properties`. - In `.github/workflows/build-steps.yml`, pass `--define sonar.cfamily.compile-commands="$BUILD_WRAPPER_OUT_DIR/compile_commands.json"`. **Root cause** The SonarCloud config still used the deprecated `sonar.cfamily.build-wrapper-output` property. The current CFamily analyzer expects a `compile_commands.json` (produced by build-wrapper). Using the old property caused scanner failures and blocked analysis. **Validation** Regenerated `bw_output/compile_commands.json`, ran `sonar-scanner`, and confirmed the scan completed and uploaded successfully. **Tests** CI-only change. Verified locally by running the scanner against a fresh build-wrapper capture. --------- Signed-off-by: Vanessa Valderrama <[email protected]>
Fix SonarCloud analysis failures by switching the C/C++ configuration from the deprecated `sonar.cfamily.build-wrapper-output` property to the current `sonar.cfamily.compile-commands` property. **Changes** - Remove `sonar.cfamily.build-wrapper-output` from `sonar-project.properties`. - In `.github/workflows/build-steps.yml`, pass `--define sonar.cfamily.compile-commands="$BUILD_WRAPPER_OUT_DIR/compile_commands.json"`. **Root cause** The SonarCloud config still used the deprecated `sonar.cfamily.build-wrapper-output` property. The current CFamily analyzer expects a `compile_commands.json` (produced by build-wrapper). Using the old property caused scanner failures and blocked analysis. **Validation** Regenerated `bw_output/compile_commands.json`, ran `sonar-scanner`, and confirmed the scan completed and uploaded successfully. **Tests** CI-only change. Verified locally by running the scanner against a fresh build-wrapper capture. --------- Signed-off-by: Vanessa Valderrama <[email protected]>
Description
Fix SonarCloud analysis failures by switching the C/C++ configuration from the
deprecated
sonar.cfamily.build-wrapper-outputproperty to the currentsonar.cfamily.compile-commandsproperty.Changes
sonar.cfamily.build-wrapper-outputfromsonar-project.properties..github/workflows/build-steps.yml, pass--define sonar.cfamily.compile-commands="$BUILD_WRAPPER_OUT_DIR/compile_commands.json".Root cause
The SonarCloud config still used the deprecated
sonar.cfamily.build-wrapper-outputproperty. The current CFamily analyzer expects a
compile_commands.json(produced by build-wrapper). Using the old property caused scanner failures and
blocked analysis.
Validation
Regenerated
bw_output/compile_commands.json, ransonar-scanner, andconfirmed the scan completed and uploaded successfully.
Tests
CI-only change. Verified locally by running the scanner against a fresh
build-wrapper capture.
Checklist
contribution guidelines.
N/A — CI-only change.
bindings. N/A — not applicable.