xstylev1.0.0
ResourcesRessources

DevelopmentDéveloppement

Build modes, tests, the layout of the sources, the workflows and how a release is made.Modes de compilation, tests, organisation des sources, workflows et fabrication d'une release.

1. BuildCompiler

make                                                 # configure & build into build/
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug         # debug build (-g -ggdb3)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Asan          # AddressSanitizer build
cmake --build build --target release                 # Debug, Asan & Optimized builds
cmake --build build --target package_release         # RPM / DEB / Arch packages of every variant
cmake --build build --target get_unregistered_files  # .cpp files missing from SRC / SRC_SHARED
./xstyle --rtk -r src include tests CMakeLists.txt   # xstyle stays clean on itself (checked by the CI)

Every new .cpp goes in SRC (executable only) or SRC_SHARED (executable and tests) of the CMakeLists.txt.

make                                                 # configurer et compiler dans build/
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug         # build debug (-g -ggdb3)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Asan          # build AddressSanitizer
cmake --build build --target release                 # builds Debug, Asan et Optimized
cmake --build build --target package_release         # paquets RPM / DEB / Arch de chaque variante
cmake --build build --target get_unregistered_files  # .cpp absents de SRC / SRC_SHARED
./xstyle --rtk -r src include tests CMakeLists.txt   # xstyle reste propre sur lui-même (vérifié par la CI)

Chaque nouveau .cpp va dans SRC (exécutable seul) ou SRC_SHARED (exécutable et tests) du CMakeLists.txt.

2. TestsTests

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build --parallel $(nproc)   # ./unit_tests at the root
(cd build && ctest --output-on-failure)   # GoogleTest + command line tests
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build --parallel $(nproc)   # ./unit_tests à la racine
(cd build && ctest --output-on-failure)   # GoogleTest + tests de la ligne de commande

3. SourcesSources

PathContent
src/xstyle/main.cpp (entry), Core.cpp (arguments, run), Checker.cpp (rules and fix loop), Reporter.cpp, Rules.cpp (rule table), check/ (one file per family)
include/xstyle/headers
assets/fonts/ansi_shadow.flfbanner font of the file headers, embedded at build time
tests/xstyle/unit tests (GoogleTest) and command line tests (ctest)
docs/site/sources of this site (Markdown + gen/ generators)
CheminContenu
src/xstyle/main.cpp (entrée), Core.cpp (arguments, lancement), Checker.cpp (règles et boucle de correction), Reporter.cpp, Rules.cpp (table des règles), check/ (un fichier par famille)
include/xstyle/headers
assets/fonts/ansi_shadow.flfpolice de la bannière des en-têtes, embarquée à la compilation
tests/xstyle/tests unitaires (GoogleTest) et tests de la ligne de commande (ctest)
docs/site/sources de ce site (Markdown + générateurs gen/)

4. This siteCe site

make                                                                     # gen/ reads ./xstyle
python3 ~/.claude/skills/better-html-doc/scripts/build_site.py --site docs/site --out docs

The pages are written in docs/ and published on gh-pages by Docs - Pages (CD) at the next push. The rules and options pages are generated from ./xstyle --list-rules and ./xstyle --help.

make                                                                     # gen/ lit ./xstyle
python3 ~/.claude/skills/better-html-doc/scripts/build_site.py --site docs/site --out docs

Les pages sont écrites dans docs/ et publiées sur gh-pages par Docs - Pages (CD) au push suivant. Les pages des règles et des options sont générées depuis ./xstyle --list-rules et ./xstyle --help.

5. Workflows and releasesWorkflows et releases

WorkflowDoes
Dispatch (CI/CD)on every push of main or a tag v* (not *.md / *.txt / docs/ only): decides what runs
Unit Tests (CI)builds and runs the tests, always first
Build (CI)build check and xstyle on its own sources (--fail-on major), when no package is built
Build - Packages (CI/CD)RPM / DEB / Arch packages, signed and published on gh-pages
Release - GitHub (CD)the GitHub release of a tag, from its section of CHANGELOG.md
Docs - Pages (CD)copies docs/ on gh-pages

A tag vX.Y.Z (its ## vX.Y.Z - date section must exist in the changelog) builds the stable packages and the release; a tag vX.Y.Z-<suffix> or a commit with [build] the -pre packages; [ignore] skips the CI.

WorkflowFait
Dispatch (CI/CD)à chaque push de main ou d'un tag v* (pas pour *.md / *.txt / docs/ seuls) : décide de ce qui tourne
Unit Tests (CI)compile et lance les tests, toujours en premier
Build (CI)vérification du build et xstyle sur ses propres sources (--fail-on major), quand aucun paquet n'est construit
Build - Packages (CI/CD)paquets RPM / DEB / Arch, signés et publiés sur gh-pages
Release - GitHub (CD)la release GitHub d'un tag, depuis sa section du CHANGELOG.md
Docs - Pages (CD)copie docs/ sur gh-pages

Un tag vX.Y.Z (sa section ## vX.Y.Z - date doit exister dans le changelog) construit les paquets stables et la release ; un tag vX.Y.Z-<suffixe> ou un commit avec [build] les paquets -pre ; [ignore] saute la CI.