Skip to content

Commit cb88b0c

Browse files
committed
Document the org structure and index the axes of variability
1 parent 3e37c82 commit cb88b0c

File tree

2 files changed

+70
-22
lines changed

2 files changed

+70
-22
lines changed

README.adoc

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ An example of a flawed C++ code. The https://github.com/sc-sq-c-family-examples/
55
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.
66
The downstream repositories are analyzed either with https://www.sonarqube.org/[SonarQube] or https://sonarcloud.io/[SonarCloud].
77

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`):
10-
11-
Clone the newly created repository:
12-
----
13-
git clone gh:sc-sq-c-family-examples/linux-cmake-gh-actions
14-
cd linux-cmake-gh-actions
15-
----
16-
Add the https://github.com/sc-sq-c-family-examples/code[code repository] as a second remote named `code`:
17-
----
18-
git remote add code git@github.com:sc-sq-c-family-examples/code
19-
----
20-
Get the code:
21-
----
22-
git pull code master
23-
----
24-
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.
25-
26-
Push the changes to the custom repository:
27-
----
28-
git push origin master
29-
----
8+
You can find examples for:
9+
* https://github.com/sc-sq-c-family-examples?q=linux[Linux]
10+
* https://github.com/sc-sq-c-family-examples?q=macos[MacOS]
11+
* https://github.com/sc-sq-c-family-examples?q=windows[Windows]
12+
13+
Using the following build systems:
14+
* https://github.com/sc-sq-c-family-examples?q=cmake[CMake]
15+
* https://github.com/sc-sq-c-family-examples?q=autotools[GNU Autotools]
16+
* https://github.com/sc-sq-c-family-examples?q=xcode[Xcode]
17+
* https://github.com/sc-sq-c-family-examples?q=msbuild[MSBuild]
18+
19+
Running on the following CI services:
20+
* https://github.com/sc-sq-c-family-examples?q=azure[Azure DevOps]
21+
* https://github.com/sc-sq-c-family-examples?q=gh-actions[GitHub Actions]
22+
* https://github.com/sc-sq-c-family-examples?q=travis[Travis]
23+
* https://github.com/sc-sq-c-family-examples?q=jenkins[Jenkins]
24+
* https://github.com/sc-sq-c-family-examples?q=gitlab[GitLab CI]
25+
* https://github.com/sc-sq-c-family-examples?q=bitbucket[BitBucket Pipelines]
26+
27+
Configured for analysis on:
28+
* https://github.com/sc-sq-c-family-examples?q=-sq[SonarQube]
29+
* https://github.com/sc-sq-c-family-examples?q=-sc[SonarCloud]
30+
31+
32+
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.

examples-structure.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
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].
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`:
22+
----
23+
git remote add code git@github.com:sc-sq-c-family-examples/code
24+
----
25+
Get the code:
26+
----
27+
git pull code main
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.
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:
39+
----
40+
git clone gh:sc-sq-c-family-examples/linux-cmake-azure-sc
41+
cd linux-cmake-azure-sc
42+
git remote add code git@github.com:sc-sq-c-family-examples/linux-cmake
43+
git pull code main
44+
git push origin main
45+
----

0 commit comments

Comments
 (0)