Skip to content

Commit 0326e95

Browse files
Update README.adoc
1 parent 829ec27 commit 0326e95

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 SonarQube using compilation database (compile_commands.json)
1+
= C++ example project scanned on SonarQube Server using compilation database (compile_commands.json)
22
// URIs:
33
:uri-qg-status: https://next.sonarqube.com/sonarqube/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sq_AYCKCTwgbpi2xFX3-L27
44
:img-qg-status: https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sq_AYCKCTwgbpi2xFX3-L27&metric=alert_status&token=squ_a0683d6d23bc3fa8b93a6befc840c774511333cc
@@ -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://next.sonarqube.com/sonarqube/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sq_AYCKCTwgbpi2xFX3-L27[SonarQube]!*
11+
*This project is analysed on https://next.sonarqube.com/sonarqube/dashboard?id=sonarsource-cfamily-examples_linux-cmake-compdb-gh-actions-sq_AYCKCTwgbpi2xFX3-L27[SonarQube Server]!*
1212

1313

1414
It is very easy to analyze a C, C++ and Objective-C project with SonarQube using compilation database:
1515

1616
. Create a `sonar-project.properties` file to store your configuration
1717
. In your `.github/workflows/build.yml` file:
1818
.. Set the environment variable `SONAR_HOST_URL` to your server url (e.g.: https://example.com:9000)
19-
.. Download the Sonar Scanner using https://github.com/SonarSource/sonarqube-github-c-cpp[the SonarQube Scan for C and C++ Github Action]
20-
.. Generate the compilation database file (set `CMAKE_EXPORT_COMPILE_COMMANDS` to `ON`)
21-
.. Run `sonar-scanner` with the property `sonar.cfamily.compile-commands` set to your compilation database file
22-
. Ensure that your token is stored as a secret in your repository (`SONARQUBE_TOKEN` in this example project). If you don't have a token yet, you can generate a new one in SonarQube (see https://docs.sonarqube.org/latest/user-guide/user-token/[Generating and Using Tokens]).
19+
.. Download the Build Wrapper using https://github.com/SonarSource/sonarqube-scan-action[the SonarSource/sonarqube-scan-action/install-build-wrapper action]
20+
.. Wrap your compilation with the Build Wrapper
21+
.. Run the SonarQube scan using https://github.com/SonarSource/sonarqube-scan-action[the SonarSource/sonarqube-scan-action action] as final step
22+
. Ensure that your token is stored as a secret in your repository (`SONARQUBE_TOKEN` in this example project). If you don't have a token yet, you can generate a new one in SonarQube Server (see https://docs.sonarsource.com/sonarqube-server/latest/user-guide/managing-tokens/[Managing your tokens]).
2323

2424
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.
2525

2626
= Documentation
2727

28-
- https://docs.sonarqube.org/latest/analysis/languages/cfamily/[Documentation overview of the C, C++ and Objective-C analyzer]
29-
- https://docs.sonarqube.org/latest/analysis/github-integration/[GitHub Integration in SonarQube]
30-
- https://docs.sonarqube.org/latest/analyzing-source-code/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database (compile_commands.json)]
31-
- https://docs.sonarqube.org/latest/analyzing-source-code/languages/c-family/running-the-analysis/[Running the analysis in Compilation Database mode]
28+
- https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/overview/[C/C++/Objective-C analysis overview]
29+
- https://docs.sonarsource.com/sonarqube-server/latest/devops-platform-integration/github-integration/introduction/[GitHub Integration]
30+
- https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/prerequisites/#generating-a-compilation-database[Generating a compilation database]
31+
- https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/running-the-analysis/[Running the CFamily analysis]
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] is meant to 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.sonarsource.com/products/sonarqube/[SonarQube Server] or https://www.sonarsource.com/products/sonarcloud/[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)