Sorry for the late reply.
Are you still facing the issue?
We analyze the files that are built by the command wrapped with build-wrapper and indexed by the sonar-scanner.
To analyze the source and test file, the command provided to build wrapper should cleanly build both of them. you can combine the two in one script and wrap it.
You can look at the generated JSON file to see the compilation command captured by build-wrapper.
Let me know if you have further questions,
Thanks,
I’m not sure I understand the issue you are facing.
Let’s try to follow your example:
In this case, if you want to analyze both source and test I would create a script that runs both. Let’s say BuildAndTest.sh that call idf.py build and idf.py test.
Then instead of calling: build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} idf.py build
i would call: build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ``` bash BuildAndTest.sh