Run sonar cloud on C/C++ bindings [AP-910] #1374
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@swift-nav/devinfra
Add GA stage to run C/C++ code through sonar cloud
The main sonar cloud stage currently excludes C/C++ code from analysis. Due to the way C/C++ code needs to be processed this stage needs to remain as is.
There is already an extra project in sonar cloud setup up to receive C/C++ but it is currently unused. This PR adds a new stage in GA which runs all the C/C++ unit tests to generate code coverage data, then calls the sonar scanner utility.
Results are posted here as a comment and there is a new status which could be set as a gate on merging PRs (but isn't at the moment)
Code coverage isn't showing up properly on this PR because I accidentally pushed a master analysis to sonar cloud during development of this PR. Since there are no code changes on this PR the diff is 0 and the sonar cloud results are also 0. To test this work I added a new message but didn't create any unit tests. The sonar cloud stage ran properly, detected a couple of code smells and complained about the lack of test coverage. The testing message has since been removed from this branch and is no longer visible.
Results for master can be viewed by going to sonarcloud.io. These results will be the baseline for any future PRs
API compatibility
Does this change introduce a API compatibility risk?
N/A
API compatibility plan
If the above is "Yes", please detail the compatibility (or migration) plan:
N/A
JIRA Reference
https://swift-nav.atlassian.net/browse/AP-910