You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*The test coverage shown here works on both SonarQube and SonarCloud. This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_windows-msbuild-opencppcoverage-gh-actions-sc[SonarCloud]!*
11
+
*The test coverage shown here works on both SonarQube Server and Cloud. This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_windows-msbuild-opencppcoverage-gh-actions-sc[SonarQube Cloud]!*
12
12
13
13
:note-caption: :information_source:
14
14
NOTE: This simple example aims at demonstrating code coverage in action. It explains how to add coverage on a project for which the analysis is already configured. Analysis configuration examples are available https://github.com/sonarsource-cfamily-examples?q=topic%3Amsbuild[here]. +
@@ -18,25 +18,25 @@ To get coverage and feed it to the sonar-scanner, use the following procedure:
18
18
19
19
. Build and run your tests using `vstest.console.exe`, wrapping the call with `OpenCppCoverage.exe`
20
20
. Point the property `sonar.cfamily.cobertura.reportPaths` to the path that will contain your XML coverage report
21
-
. Run `sonar-scanner` as the final step
21
+
. Run the SonarQube scan using https://github.com/SonarSource/sonarqube-scan-action[the SonarSource/sonarqube-scan-action action] as final step
22
22
23
23
You can take a look at the link:sonar-project.properties[sonar-project.properties] and link:.github/workflows/build.yml[build.yml] to see it in practice.
24
24
25
25
= Documentation
26
26
27
-
- https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/[Documentation overview of the C, C++ and Objective-C analyzer]
28
-
- https://docs.sonarcloud.io/getting-started/github/[Documentation of using SonarCloud with GitHub]
29
-
- https://docs.sonarcloud.io/advanced-setup/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database (compile_commands.json)]
30
-
- https://docs.sonarsource.com/sonarcloud/advanced-setup/languages/c-family/running-the-analysis/[Running the analysis in Compilation Database mode]
- https://docs.sonarsource.com/sonarqube-cloud/getting-started/github/[Getting started with GitHub]
29
+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database]
30
+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/languages/c-family/running-the-analysis/[Running the CFamily analysis]
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/[Analyze your repository with GitHub Actions]
33
33
34
34
= Code Description
35
35
36
36
An example of a flawed C++ code. The https://github.com/sonarsource-cfamily-examples/code[code repository] can be https://github.com/sonarsource-cfamily-examples/automatic-analysis-sc[analyzed automatically], but it can also be compiled with different build systems using different CI pipelines on Linux, macOS, and Windows.
37
37
38
38
The https://github.com/sonarsource-cfamily-examples/code[code repository] is forked into other repositories in https://github.com/sonarsource-cfamily-examples[this collection] to add a specific build system, platform, and CI.
39
-
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
39
+
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube Server] or https://sonarcloud.io/[SonarQube Cloud].
40
40
41
41
You can find examples for:
42
42
@@ -63,8 +63,8 @@ Running on the following CI services:
0 commit comments