Multiple-platform C++ project Github PR integration

Background

Let me give you some background on the way our project gets compiled before getting into what I want to do and see if it is possible to do it or what is the best approach to take.

We have a repo for a project. This project is a C++ multi-platform: Windows and macOS, thus we need to compile it twice one in each platform.
In the case of Windows we are generating the msi installer as a separate compilation target once we know the compilation of the binaries has finished successfully.

Currently we have our Qualys setup as 3 different projects: “macOS project”, “Windows Binaries project” and “Windows Installer project”.

What we want to achieve

What we want to achieve is to be able to integrate the SonarQube scans results to the Github PRs using the Sonar Github plugin.

Based on what I’ve researched online. This is not supported for the case where multiple project scans are made for a single repository [1], [2].

What is the best approach to tackle this? We see no way to have eveything in the same project as we need to compile the project multiple times. We cannot compile both platforms in one go. Most of the code is the same but there are implementation files that are platform dependent that can only be included when compiling for a particular platform.

Thanks in advance.
Best regards,
Santiago Alessandri

Hi,

I guess your concern is overwriting the PR decoration in GitHub? Because on the SonarQube side, I don’t immediately see why this wouldn’t work: each of your 3 projects analyzes the PR (or short-lived branch) and you use the status in SonarQube for your quality information.

Ann

Hi Ann,

Thanks for the quick reply.

Exactly that’s what we are concerned about. We are currently only analyzing the main branch after merging and using the results we see in the SonarQube report for each.
But we wanted to add the decoration to the PRs so that we don’t allow merging in case major or critical issues are found. If the decorations are overwritten, it will kind of defeat the purpose of the integration.

Best regards,
Santiago

Hi Santiago,

At this point we have no plans for addressing your use case within the GH decoration.

Ann