This rule set is incomplete and is not enabled. CI and the commit workflow do not call it, so its output is not a gate. Until this directory is complete, the conventions in Development.md and the root
.clang-formatremain authoritative.
This directory contains reusable C++ policy. LLVM 21.1.0 is the tested baseline. Configuration comments describe the scope and limitations of each rule. Repository paths are inputs to the runner.
Edit .clang-format here, then synchronize the IDE configuration at the repository root:
cmake -DSYNC_FORMAT=ON -P scripts/cpp-rules/Check.cmakeRun the policy's positive and negative examples:
cmake -P scripts/cpp-rules/tests/Run.cmakeCheck explicitly selected owned files with a compilation database generated by CMake using CMAKE_EXPORT_COMPILE_COMMANDS=ON. Run from the repository root. Quote the semicolon-separated file list:
cmake -DBUILD_DIR=build/Release "-DFILES=path/to/First.cpp;path/to/Second.cpp" "-DHEADER_FILTER=<owned-header-path-regex>" -P scripts/cpp-rules/Check.cmakeThe runner checks formatting without rewriting files and treats naming violations as errors. Headers listed directly receive format checks. C++ declarations in headers are analyzed through translation units and the required header filter. A successful run covers only the supplied translation units and their active preprocessing branches. The runner performs no automatic rename.
This is an initial policy, not complete enforcement of Development.md. API namespace exceptions, precise static-storage prefixes, acronym spelling, header guards, filenames, include grouping, documentation comments, pointer deduction spelling, destructor override and header final restrictions remain pending. Existing public API names require review before applying renames. Human review still covers ownership, lifetime, abstraction boundaries and the reasons for implementation constraints. The current naming configuration uses clang-tidy's classification of constants, including const-qualified variables. Constant/member/storage precedence requires further repository trials before enabling this policy in CI.
The root format file is an exact generated copy checked by the runner. The tidy configuration is passed explicitly to avoid a second manually maintained copy. Changes to the shared policy must pass the examples before adoption by a repository.