Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 2 KB

File metadata and controls

90 lines (62 loc) · 2 KB

Contributing

Commit convention

Commit subjects follow:

semver(<major|minor|patch>):

Use .github/skills/semver-commit-description/SKILL.md for release-impact classification and body structure.

Commit bodies should follow this format:

  • Why
  • What changed
  • Compatibility
  • Validation

Branching model

  • Create feature branches from main.
  • Open pull requests targeting main.
  • main is the release branch.
  • Releases are tagged as v.

Local Definition of Done

Before asking for review, run the local gates below.

  1. Conan install succeeds (use a clean build directory and, when needed, a clean cache).
mkdir -p build && cd build
conan install .. --build=missing -pr:b=default -s build_type=Release
cd ..
  1. Configure strict clang build.

Conan-generated preset names can vary by environment and generator (for example, conan-release vs conan-default), so use the explicit toolchain configure form for portability.

cmake -S . -B build/Release -G Ninja \
  -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake \
  -DPOLYCPP_WARNINGS_AS_ERRORS=ON \
  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
  1. Build succeeds.
cmake --build build/Release
  1. All tests pass.
ctest --test-dir build/Release --output-on-failure
  1. cppcheck gate passes.
find projects -type d \( -name include -o -name src -o -name tests \) -print0 |
  xargs -0 cppcheck --enable=warning,style,performance,portability \
    --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr
  1. clang-format gate passes.
clang-format-18 --dry-run --Werror $(git ls-files '*.cpp' '*.hpp' '*.c' '*.h')
  1. Packaging-affecting changes only: package generation succeeds.
cd build/Release && cpack -G "DEB;RPM"
  1. Docker-affecting changes only: Docker dev image builds.
docker build -f Dockerfile.dev .

Adding a new subproject

Use docs/adding-subproject.md for the full checklist and examples.