Skip to content
BETAGuardrails are in beta. The library, the configuration format and the CLI command can still change.

Guardrails

cpp

4 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
cpp/cmake-minimum-floorwarningA CMake build names the CMake version whose policy defaults it configures under, and that version is no older than the configured floor.
cpp/package-manager-declaredwarningThe checkout declares its dependencies through vcpkg or Conan, so it names the versions it builds against rather than taking whatever the machine carries.
cpp/standard-declaredwarningA CMake build that enables C++ declares the standard it compiles against, and that standard is no older than the configured floor.
cpp/standard-requiredwarningA CMake build that enables C++ requires the standard it declares, so a compiler that does not offer it fails rather than falling back to an older one.

Shared inputs

Every cpp guardrail declares these inputs, and each one may add its own.

InputDescriptionDefault
projectDirDirectory holding the project, relative to the directory the CLI runs in..

Shared collectors

Every cpp guardrail is handed the facts these collectors gather, and each one may ask for more of its own.

CollectorGathers
cppThe C or C++ build in the project directory: which build system and package manager it uses, the C++ standard and CMake version it requires, the packages it declares and which of them are pinned, and the packages it expects the machine to carry. CMakeLists.txt is a script, so what it declares conditionally is not seen and scanned says so.

Every guardrail in this category is configured the same way, in the guardrails.checks array of buildnote.json. See Configuring guardrails for every option, and Guardrails to search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412