CXX code duplication in subprojects

Our team has large CXX embedded project based on Yocto. During build execution, project can be built in 3 different configurations - arm64-debug, arm64-release and arm32-debug from one repository. We want to see this project as 3 different projects in SonarQube. Source code contains more than 80% of reused code lines. When 3 projects were scanned, we see triple code lines usage in our license information. We don’t want to pay triple price for similar source code. What we can do to avoid this?
UPD: We are using latest SonarQube version 9.5 Developer Edition

Hey there.

Some folks use branch analysis (creating a separate branch in SonarQube for each architecture)

Otherwise, we don’t have a good solution yet. It’s something on our roadmap that you can vote for.

1 Like