doctor#
Check tool availability and minimum versions, and validate the project layout.
clibra doctor
Run this before starting a new project or after setting up a new machine. It checks every tool LIBRA can use, reports which are missing or below the minimum version, and validates that the project layout follows the expected conventions.
Output#
Each checked item is reported with one of three symbols:
✓— present and meets the minimum version requirement.⚠— optional tool or recommended convention; missing it limits specific features but does not prevent basic builds.✗— required tool (or invalid JSON in a presets file); must be resolved before proceeding.
Example output:
Checking LIBRA environment...
Tools:
✓ cmake -> /usr/bin/cmake >= 3.31.0
✓ ninja -> /usr/bin/ninja (present)
✓ gcc -> /usr/bin/gcc >= 9.0.0
✓ g++ -> /usr/bin/g++ >= 9.0.0
⚠ clang not found (optional)
⚠ gcovr not found (optional)
⚠ cppcheck not found (optional)
⚠ clang-tidy not found (optional)
Project structure:
✓ CMakePresets.json exists
✓ src/ exists
⚠ tests/ does not exist
⚠ docs/Doxyfile.in does not exist
✓ CMakePresets.json is valid JSON
Checked 14 items: 0 errors, 5 warnings, 9 ok
clibra doctor exits non-zero if any ✗ items are found. Warnings
do not affect the exit code.
Checked tools#
Only cmake is required; every other tool is optional and gates a
specific feature. Tools without a listed minimum version are checked for
presence only.
Tool |
Min version |
Required for |
|---|---|---|
|
3.31 |
Everything. Required. |
|
any |
Recommended generator. Optional. |
|
any |
Alternative generator. Optional. |
|
any |
|
|
9 |
C/C++ compilation. Optional (one compiler family required). |
|
14 |
C/C++ compilation, analysis, formatting. Optional. |
|
2025.0 |
Intel LLVM compilation. Optional. |
|
5.0 |
GNU coverage reports and checks. Optional. |
|
2.0 |
Alternative coverage tooling. Optional. |
|
2.1 |
Static analysis. Optional. |
|
14 |
Static analysis and auto-fixing. Optional. |
|
14 |
Static analysis and auto-fixing. Optional. |
|
14 |
Code formatting. Optional. |
|
14 |
LLVM-based coverage reports. Optional. |
|
14 |
LLVM coverage data processing. Optional. |
|
any |
Build caching. Optional. |
|
0.6 |
CMake formatting and format checks. Optional. |
|
any |
Shell-based testing. Optional. |
|
any |
API documentation generation. Optional. |
|
any |
HTML coverage report generation. Optional. |
Checked project structure#
Every path below is reported as ⚠ (not ✗) when missing, so a
lean project that omits, say, docs/ still passes. The two presets
files are additionally validated as well-formed JSON; invalid JSON is a
hard error (✗).
Path |
Notes |
|---|---|
|
Recommended. Required for preset-based workflows. Validated as JSON. |
|
Optional. Personal default preset configuration. Validated as JSON. |
|
Recommended. Required for source file auto-discovery. |
|
Recommended. Required for header auto-discovery. |
|
Recommended. Required for test auto-discovery. |
|
Optional. Required if |
|
Optional. Required for Doxygen API doc generation. |
|
Optional. Required for Sphinx doc generation. |
Flag reference#
clibra doctor#
Check tool availability and minimum versions, and validate the project layout
Usage: clibra doctor [OPTIONS]