I’m trying to execute a simple scan over a Linux Debian/perl based code (without having to do a full build) -getting error:
018-07-02T08:32:48.7072732Z INFO: Using 1 thread for analysis according to value of “sonar.cfamily.threads” property.
2018-07-02T08:32:48.7274550Z ##[error]ERROR: Property “sonar.cfamily.build-wrapper-output” was not specified.
which stops execution. VSTS is cloud hosted and using Sonar cloud to undertake analysis.
This error means that SonarCloud found C/C++ files which require first a full build (with the C/C++ build wrapper) to make sure the correct configuration is passed through the build wrapper output file. So in other words: it’s not possible to run an analysis on C/C++ without having first built the source code.
Running into the same problem and can’t find any documentation on how to get this resolved. Documentation only mentions to build it using the wrapper however nowhere does it state how to actually accomplish this using VSTS. Any assistance with this would be much appreciated.
Still not able to get this working natively in VSTS. Would be great if someone from SonarCloud could step up and provide some assistance here, I am sure there are many people that would benefit from knowing how to do this using VSTS and the Hosted build agents…
Ruan: the script I shared downloads the build wrapper, so you just need to add a Bash task (or similar - like a Powershell task if you prefer) in your Azure Pipeline and execute it before you trigger the “Run Analysis” task.
I’ve created VSTS-178 to make it easier for C/C++ users to configure their jobs.
Fabrice: Thanks for the feature request. I finally got it to build using the wrapper on a Hosted Windows machine in VSTS. All the tasks now succeeds however when I check sonarcloud after (the published link provided) it seems that there is no data. As in lot of the code is missing from the report. I’ve checked exclusions and only have the below, which is the same for other projects we have and works (although no wrapper needed for them). Any suggestions?
I’m definitely not an expert in this C# and C++ mixed solutions, but it looks like you are missing some steps required to perform a successful analysis in this context.
do you think you could share logs from the build? (maybe even privately) Because without logs, this is going to be extremely difficult for me to be able to help you (running analyses on a solution which contains a mix of C#/C/C++ is probably the most complex use case we can think of).
from the logs I can see 25 c++ files analyzed and C# reports being imported. What do you mean when you say that you don’t see a lot of code? Are you referring to what files? C++? C#? Others?