|
1 | 1 |
|
2 | 2 | = Structure of the Examples Org
|
3 |
| -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]. |
| 3 | +https://github.com/sonarsource-cfamily-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 | 4 |
|
5 | 5 | The repositories form a hierarchy.
|
6 | 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. |
| 7 | +* The hierarchy starts from the https://github.com/sonarsource-cfamily-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/sonarsource-cfamily-examples/windows-msbuild[windows-msbuild] or https://github.com/sonarsource-cfamily-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/sonarsource-cfamily-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 | 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]. |
| 11 | +Here is an example dependency path: https://github.com/sonarsource-cfamily-examples/code[code] -> https://github.com/sonarsource-cfamily-examples/linux-cmake[linux-cmake] -> https://github.com/sonarsource-cfamily-examples/linux-cmake-azure-sc[linux-cmake-azure-sc]. |
12 | 12 |
|
13 | 13 | == Forking the code repository
|
14 | 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 | 15 |
|
16 | 16 | Clone the newly created repository:
|
17 | 17 | ----
|
18 |
| -git clone git@github.com:sc-sq-c-family-examples/linux-cmake |
| 18 | +git clone git@github.com:sonarsource-cfamily-examples/linux-cmake |
19 | 19 | cd linux-cmake
|
20 | 20 | ----
|
21 |
| -Add the https://github.com/sc-sq-c-family-examples/code[code repository] as a second remote named `code`: |
| 21 | +Add the https://github.com/sonarsource-cfamily-examples/code[code repository] as a second remote named `code`: |
22 | 22 | ----
|
23 |
| -git remote add code git@github.com:sc-sq-c-family-examples/code |
| 23 | +git remote add code git@github.com:sonarsource-cfamily-examples/code |
24 | 24 | ----
|
25 | 25 | Get the code:
|
26 | 26 | ----
|
27 | 27 | git pull code main
|
28 | 28 | ----
|
29 |
| -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. |
| 29 | +If the contents of the https://github.com/sonarsource-cfamily-examples/code[code repository] changes, you can pull the changes with the last command. |
30 | 30 |
|
31 | 31 | Push the changes to the custom repository:
|
32 | 32 | ----
|
33 | 33 | git push origin main
|
34 | 34 | ----
|
35 | 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). |
| 36 | +This will enable the flow of changes from the https://github.com/sonarsource-cfamily-examples/code[code] repository to the https://github.com/sonarsource-cfamily-examples/linux-cmake[linux-cmake] repository (the first arrow in the example above). |
37 | 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: |
| 38 | +To make the changes flow further to the https://github.com/sonarsource-cfamily-examples/linux-cmake-azure-sc[linux-cmake-azure-sc] repository: |
39 | 39 | ----
|
40 |
| -git clone git@github.com:sc-sq-c-family-examples/linux-cmake-azure-sc |
| 40 | +git clone git@github.com:sonarsource-cfamily-examples/linux-cmake-azure-sc |
41 | 41 | cd linux-cmake-azure-sc
|
42 |
| -git remote add code git@github.com:sc-sq-c-family-examples/linux-cmake |
| 42 | +git remote add code git@github.com:sonarsource-cfamily-examples/linux-cmake |
43 | 43 | git pull code main
|
44 | 44 | git push origin main
|
45 | 45 | ----
|
0 commit comments