Hello,
I have created a bitbucket pipeline for one of my repository but the analysis always failed with ERROR.
I had tired to make the changes in YML file and rerun the pipeline but still not able to resolve and complete the scanning process.
Here I’m attaching the screenshot of the error.
Please help and pass your information on the same.
Hello @Claire_Villard ,
Firstly, I would like to say thanks for the reply.
I tried to enable the debug mode but how to enable this “-X”. I doesn’t find any doc related to this.
Please help me to resolve this.
At the very end of the logs, there is this message:
15:09:18.800 ERROR:
The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper and setting the property "sonar.cfamily.build-wrapper-output" or by using Clang Compilation Database and setting the property "sonar.cfamily.compile-commands". None of these two options were specified.
If you don't want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties:
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
If your project contain C, C++ or ObjectiveC files, you should not use the sonarcloud-scan pipe, but the Sonar Build Wrapper.
I recommend to import the project from BitBucket onto SonarCloud, and then to follow the tutorial to configure the analysis with BitBucket pipelines.
At the third step, when creating the pipeline, please choose the C, C++ or ObjC option and use the the pipeline example provided by SonarCloud. Do not forget to replace <insert_your_clean_build_command> by yours on this line of the example:
The tutorial provides you an example of pipeline with all the needed configuration, except for the build command that is specific to your project and not to SonarCloud.
All the SonarCloud documentation is online here: https://sonarcloud.io/documentation
The advanced setup documentation for C, C++, ObjC languages is here, if ever the example is not enough for your needs.