cpp
4 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
cpp/cmake-minimum-floor | warning | A CMake build names the CMake version whose policy defaults it uses, and that version is no older than the configured floor. |
cpp/package-manager-declared | warning | The 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-declared | warning | A CMake build that enables C++ declares the standard it compiles against, and that standard is no older than the configured floor. |
cpp/standard-required | warning | A 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.
| Input | Description | Default |
|---|---|---|
projectDir | Directory 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.
| Collector | Gathers |
|---|---|
cpp | The 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.