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.
12
-
In SonarQube import of branch coverage information from llvm-cov report is available only starting from SonarQube version `10.0`.
13
-
This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_linux-cmake-llvm-cov-gh-actions-sc[SonarCloud]!*
11
+
*The test coverage shown here works on both SonarQube Server and Cloud.
12
+
In SonarQube Server, the import of branch coverage information from llvm-cov report is available only starting from version `10.0`.
13
+
This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_linux-cmake-llvm-cov-gh-actions-sc[SonarQube Cloud]!*
14
14
15
15
:note-caption: :information_source:
16
16
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 <<code-description,here>>. +
@@ -25,24 +25,24 @@ To get coverage and feed it to the sonar-scanner, use the following procedure.
25
25
. Run `llvm-cov show --show-branches=count` on all the test executable files (or all object files you are interested in).
26
26
. Save the output (the source files annotated with coverage counters) into a file
27
27
. Point the property `sonar.cfamily.llvm-cov.reportPath` to the file with coverage report.
28
-
. Run `sonar-scanner` as the final step
28
+
. Run the SonarQube scan using https://github.com/SonarSource/sonarqube-scan-action[the SonarSource/sonarqube-scan-action action] as final step
29
29
30
30
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.
31
31
32
32
= Documentation
33
33
34
-
- https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/[Documentation overview of the C, C++ and Objective-C analyzer]
35
-
- https://docs.sonarcloud.io/getting-started/github/[Documentation of using SonarCloud with GitHub]
36
-
- https://docs.sonarcloud.io/advanced-setup/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database (compile_commands.json)]
37
-
- https://docs.sonarsource.com/sonarcloud/advanced-setup/languages/c-family/running-the-analysis/[Running the analysis in Compilation Database mode]
38
-
- https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/[GitHub Action for C and C++ usage]
- https://docs.sonarsource.com/sonarqube-cloud/getting-started/github/[Getting started with GitHub]
36
+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/[Analyze your repository with GitHub Actions]
37
+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database]
38
+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/languages/c-family/running-the-analysis/[Running the CFamily analysis]
39
39
40
40
= Code Description
41
41
42
42
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.
43
43
44
44
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.
45
-
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
45
+
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube Server] or https://sonarcloud.io/[SonarQube Cloud].
46
46
47
47
You can find examples for:
48
48
@@ -69,8 +69,8 @@ Running on the following CI services:
0 commit comments