We are using Bitbucket Cloud and Sonar Cloud. We are running a proof of concept project to analyse our private repos that contain approx 3.5 million lines of code. Mostly C++17, but some Go, Typescript and Python.
For the PoC it was super easy to get Go, Typescript and Python repos setup to provide static code analysis and to consume the unit tests/ code coverage using a monthly team subscription.
But trying to get a sample C++ repo setup has been an absolute nightmare! If I can’t get this solved then we will likely shelve our plans to use SonarQube.
We are using Sonar Cloud and Bitbucket Cloud.
We want a reliable way of building locally on Linux (Centos & Ubuntu) and MacOS (ARM), as well as being able to build via Bitbucket Pipelines on Linux (on prem and cloud based runners).
We are using CMake to build our apps and generate the code coverage for the unit tests and to also run valgrind/memcheck. The unit tests are written using gTest.
I would really appreciate it if anyone could point me in the direction of some good documentation and even better some repos with working integration into Sonar Cloud?
Also does anyone know if there is a MacOS Build-Wrapper for ArmV8/aarch64? Or should I be using auto conf? or should I be using the official Sonar Bitbucket pipelines?
And finally does anyone know how to get CMake/gtest generate an xml file that sonnar-scanner will consume without having to resort to some xslt?
I am trying to get a simple bitbucket pipeline setup to analyse a really simple c++17 application.
But no matter what I try I just cannot get it to work.
We develop on a mixture of MacOS and Ubuntu.. I can’t find a MacOS BuildWrapper anywhere even though the docs hint at it being supported.
Can anyone point me at a public repo anywhere (Bitbucket, github, gitlab) where I can see a an example of someone building a C++17 app with CMake and Google Test and the code coverage and static analysis being successfully parsed and consumed by SonarCloud?
It really shouldnt be so difficult. Just a “hello world”-type example with a single unit test would be so helpful.
Do you have any bitbucket pipelines for building C++17 using cmake with gcov? Also where can I pull a MacOS (arm64v8/aarch64) BuildWrapper from? The docs hint at it being supported but I can’t find it.
There are 69 repos in the collection, including some BitBucket ones. There may not be the exact permutation you’re looking for, but the bits are probably assemble-able.
@stephenlclarke it should be build-wrapper-macosx-x86.zip (there are the links for SonarQube Cloud in the docs, the endpoint should be similar for the SonarQube Server instance).
Haven’t used it since I switched to Apple Silicon but I would guess that it is a combined executable working both on Intel and the new architecture.