Files
oiio/sonar-project.properties
vvalderrv 0afe9ef567 fix: Switch to compile-commands (#4879)
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 <vvalderrama@linuxfoundation.org>
2025-09-15 12:23:39 -07:00

28 lines
1.1 KiB
Properties

# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the OpenImageIO Project.
sonar.host.url=https://sonarcloud.io
# Required metadata
sonar.organization=academysoftwarefoundation
sonar.projectName=OpenImageIO
sonar.projectVersion=3.1
sonar.projectKey=AcademySoftwareFoundation_OpenImageIO
# Project links
sonar.links.homepage=https://github.com/AcademySoftwareFoundation/OpenImageIO
sonar.links.ci=https://github.com/AcademySoftwareFoundation/OpenImageIO/actions
sonar.links.scm=https://github.com/AcademySoftwareFoundation/OpenImageIO
sonar.links.issue=https://github.com/AcademySoftwareFoundation/OpenImageIO/issues
# Source properties
sonar.sources=src
sonar.exclusions=src/doc/**,src/build-scripts/**,src/include/OpenImageIO/detail/pugixml/**,src/libutil/stb_sprintf.h,src/libutil/xxhash.cpp,src/include/OpenImageIO/detail/farmhash.h,src/libutil/farmhash.cpp
sonar.sourceEncoding=UTF-8
# C/C++ analyzer properties
sonar.cfamily.gcov.reportsPath=_coverage
sonar.coverage.exclusions=src/iv/**,src/include/OpenImageIO/detail/pugixml/**,src/include/OpenImageIO/detail/fmt/**,src/libOpenImageIO/kissfft.hh
sonar.verbose=false