Skip to content

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 uses, 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 instead of taking whatever the machine has installed.
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 doesn't support it fails instead of falling back to an older one.

Shared inputs ​

Every cpp guardrail declares these inputs. Individual guardrails can add their own.

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

Shared collectors ​

Every cpp guardrail receives the facts these collectors gather. Individual guardrails can ask for more collectors of their 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.

You configure every guardrail in this category the same way, in the guardrails.checks array of buildnote.json. Configuring guardrails lists every option, and Guardrails lets you search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412