Sonar analyser could not find any Qt header, so the analysis doesn’t work well.
The analyzer was not able to find file
included from file C:/azp/agent/_work/1/s/sources/Sources/precompiled_headers.h
included from file C:/azp/agent/_work/1/b/builddir/Sources/Common/XLProToolkit/CMakeFiles/XLProToolkit.dir/cmake_pch.hxx
included from file <built-in>
We’ve got the issue since we have migrated our build system to cmake/ninja. Our previous build system was based on qmake/jom.
The analysis run on Windows 10 VM with azure agent, the analysis is triggered from our Azure DevOps Pipeline.
SonarQube : 8.9
CFamily plugin version: 126.96.36.199358
issue-file-not-found-logs.zip (1.1 MB)
In your build-wrapper json I see that you are using
-external:I. The header files that aren’t found reside in the directories added by that option:
The support of this option is coming in CFamily 6.31.
Until then you can try one of these temporary options:
Add these include directory twice using “-external:I” and “-I”. This should be functionally equivalent since the directory will still be considered external.
Avoid using this option for the analysis build.
Write a script that replace
-I in the build-wrapper.json before running the scanner.
I added a DevOps pipeline task to replace the flag in the
build-wrapper-dump.json. It works !
Here the DevOps task :
- bash: |
sed -i 's/external:I/I/g' build-wrapper-dump.json
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.