Skip to content

Commit 60bcfee

Browse files
Merge pull request #13 from sonarsource-cfamily-examples/antonio/SQCPPGHA-13-use-unified-action-1
SQCPPGHA-13 Use unified sonarqube-scan-action
2 parents 9290333 + 51598be commit 60bcfee

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= C++ example project scanned on SonarCloud using compilation database (compile_commands.json)
1+
= C++ example project scanned on SonarQube Cloud using compilation database (compile_commands.json)
22
// URIs:
33
:uri-qg-status: https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sc
44
:img-qg-status: https://sonarcloud.io/api/project_badges/measure?project=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sc&metric=alert_status
@@ -8,27 +8,27 @@
88
image:{img-build-status}[Build Status, link={uri-build-status}]
99
image:{img-qg-status}[Quality Gate Status,link={uri-qg-status}]
1010

11-
*This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sc[SonarCloud]!*
11+
*This project is analysed on https://sonarcloud.io/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sc[SonarQube Cloud]!*
1212

1313

14-
It is very easy to analyze a C, C++ and Objective-C project with SonarCloud and https://docs.sonarcloud.io/getting-started/github/[GitHub Actions] using compilation database:
14+
It is very easy to analyze a C, C++ and Objective-C project with SonarQube Cloud and https://docs.sonarsource.com/sonarqube-cloud/getting-started/github/[GitHub Actions] using compilation database:
1515

1616
. Create a `sonar-project.properties` file to store your configuration
1717
. In your `.github/workflows/build.yml` file:
18-
.. Install the Sonar Scanner using https://github.com/SonarSource/sonarcloud-github-c-cpp[SonarCloud C and C++ Github Action]
1918
.. Generate the compilation database file (set `CMAKE_EXPORT_COMPILE_COMMANDS` to `ON`)
20-
.. Run `sonar-scanner` with the property `sonar.cfamily.compile-commands` set to your compilation database file
19+
.. Run the SonarQube scan using https://github.com/SonarSource/sonarqube-scan-action[the SonarSource/sonarqube-scan-action action] with the property `sonar.cfamily.compile-commands` set to your compilation database file
2120
. Ensure that your token is stored as a secret in your repository (`SONARCLOUD_TOKEN` in this example project). You can request new tokens using https://sonarcloud.io/account/security/[Account/Security page].
2221

2322
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.
2423

2524
= Documentation
2625

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/ci-based-analysis/github-actions-for-sonarcloud/[GitHub Action for C and C++ usage]
30-
- https://docs.sonarcloud.io/advanced-setup/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database (compile_commands.json)]
31-
- https://docs.sonarsource.com/sonarcloud/advanced-setup/languages/c-family/running-the-analysis/[Running the analysis in Compilation Database mode]
26+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/languages/c-family/overview/[C/C++/Objective-C analysis overview]
27+
- https://docs.sonarsource.com/sonarqube-cloud/getting-started/github/[Getting started with GitHub]
28+
- https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/[Analyze your repository with GitHub Actions]
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]
31+
3232

3333
= Linux\CMake
3434

@@ -46,7 +46,7 @@ make
4646
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.
4747

4848
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.
49-
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
49+
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube Server] or https://sonarcloud.io/[SonarQube Cloud].
5050

5151
You can find examples for:
5252

@@ -73,8 +73,8 @@ Running on the following CI services:
7373

7474
Configured for analysis on:
7575

76-
* https://github.com/sonarsource-cfamily-examples?q=-sq[SonarQube]
77-
* https://github.com/sonarsource-cfamily-examples?q=-sc[SonarCloud]
76+
* https://github.com/sonarsource-cfamily-examples?q=-sq[SonarQube Server]
77+
* https://github.com/sonarsource-cfamily-examples?q=-sc[SonarQube Cloud]
7878

7979
You can find also a few examples demonstrating:
8080

0 commit comments

Comments
 (0)