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
Copy file name to clipboardExpand all lines: README.adoc
+25-22Lines changed: 25 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,28 @@ An example of a flawed C++ code. The https://github.com/sc-sq-c-family-examples/
5
5
The https://github.com/sc-sq-c-family-examples/code[code repository] is forked into other repositories in https://github.com/sc-sq-c-family-examples[this collection] to add a specific build system, platform, and CI.
6
6
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
7
7
8
-
== Forking the code repository
9
-
Since GitHub disallows forking of a repository within the same organization, here is the equivalent in `git` commands (on the example of `linux-cmake-gh-actions`):
See link:./examples-structure.adoc[examples-structure.adoc] for a description of the structure of https://github.com/sc-sq-c-family-examples[this GitHub organization] and the relations between its different repositories.
https://github.com/sc-sq-c-family-examples[This GitHub organization] contains a collection of example configurations for different platforms, build systems, and CI services all with one goal: analyze the code on https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
4
+
5
+
The repositories form a hierarchy.
6
+
7
+
* The hierarchy starts from the https://github.com/sc-sq-c-family-examples/code[code-only repository] that contains the flawed code and the common boilerplate files.
8
+
* The second level of hierarchy are OS\build-system repositories, such as https://github.com/sc-sq-c-family-examples/windows-msbuild[windows-msbuild] or https://github.com/sc-sq-c-family-examples/linux-cmake[linux-cmake]. They take the code from the code-only repository as is and add the build configuration files for the corresponding OS and build system.
9
+
* The last level of hierarchy are the CI-enabled repositoroes (for example, https://github.com/sc-sq-c-family-examples/linux-cmake-azure-sc[linux-cmake-azure-sc]). These repositories build upon the repositories with configured builds and add a CI configuration for popular CI services. In the CI config they set up a SonarCloud (repository name ending in `-sc`) or a SonarQube (repository name ending in `-sq`) connection.
10
+
11
+
Here is an example dependency path: https://github.com/sc-sq-c-family-examples/code[code] -> https://github.com/sc-sq-c-family-examples/linux-cmake[linux-cmake] -> https://github.com/sc-sq-c-family-examples/linux-cmake-azure-sc[linux-cmake-azure-sc].
12
+
13
+
== Forking the code repository
14
+
Since GitHub disallows forking of a repository within the same organization, here is the equivalent in `git` commands (on the example of `linux-cmake`):
15
+
16
+
Clone the newly created repository:
17
+
----
18
+
git clone gh:sc-sq-c-family-examples/linux-cmake
19
+
cd linux-cmake
20
+
----
21
+
Add the https://github.com/sc-sq-c-family-examples/code[code repository] as a second remote named `code`:
If the contents of the https://github.com/sc-sq-c-family-examples/code[code repository] changes, you can pull the changes with the last command.
30
+
31
+
Push the changes to the custom repository:
32
+
----
33
+
git push origin main
34
+
----
35
+
36
+
This will enable the flow of changes from the https://github.com/sc-sq-c-family-examples/code[code] repository to the https://github.com/sc-sq-c-family-examples/linux-cmake[linux-cmake] repository (the first arrow in the example above).
37
+
38
+
To make the changes flow further to the https://github.com/sc-sq-c-family-examples/linux-cmake-azure-sc[linux-cmake-azure-sc] repository:
0 commit comments