[#7] Analyse clang-tidy reproductible en CI et couverture des modules documentée #30
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 458 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.367
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #30"
general
weight: 0.35
ambroise-leclerc
Summary
scripts/run-clang-tidy.sh: single entry point, local and CI. Requires clang-tidy major 21 (checked at run time, version logged), a configured and built Clang preset (named-module BMIs are mandatory), and acompile_commands.jsonentry for every file in scope. Findings are promoted to errors; any tool failure, empty scope or unanalysed file fails. Nothing is reported green unless it ran..cppmunits covered,clang-diagnostic-errorcount) goes to the log andGITHUB_STEP_SUMMARY.clang-build.ymlinstallsclang-tidy-21and runs it after Build in the job that already has the Clang 21 build.include/mddlog/*/.cppm,tests/spec/.cpp,examples/.cpp;tests/framework/.hppis analysed through the specs that include it.Closes #19.
Measured coverage
First full run, clang-tidy 21.1.8 (Ubuntu 21.1.8-6ubuntu1, same build as
clang++-21):clang-diagnostic-error: 0 — named modules analyse fine against the matching Clang preset — and 77 unique findings (427 raw diagnostics, mostlyRecordingSink.hpprepeated per including spec). After this PR: 18/18 translation units clean,.cppminterface units 7/7.Limitation (also rejected up front by the script): a GCC
compile_commands.json, or a clang-tidy of another LLVM major, cannot read the Clang BMIs (module 'std' not found, "built from a different branch").Findings: fixed or justified (no blanket disables)
lock_guard→scoped_lock(24);[[nodiscard]]×3;std::erase_if;LogRecord::levelgets a default member initializer (the defaulted ctor left it uninitialised — a real latent bug); special-member declarations onLogStatistics/Log/ConsoleSink/StdStreamCapture; named constant forConsoleSink's byte estimate; include guard instead of#pragma onceinRecordingSink.hpp;reservebefore thread loops;DeliverySpecusesstd::from_charsinstead ofsscanfand widens before multiplying.NOLINT(check): reason: exportedusingdeclarations inmddlog.cppm(they are the API); the intentionally empty flushcatch;main()in examples/SpecMain; the deliberately out-of-rangeLogLevelcast inLogLevelSpec.cpp.tests/.clang-tidyandexamples/.clang-tidy(InheritParentConfig) turn off only the two magic-number checks (scenario data are literals);include/keeps them.Test plan
clang-tidy 21.1.8: 18/18 units clean, 0clang-diagnostic-error.ninja-gcc37/37,ninja-clang38/38;clang-format-21clean.Linux Clang Buildworkflow green on this PR (first CI run with the new step).<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Developer Improvements
Log records now default to the Info level, and the compiler can warn when certain query results are ignored.
Console sinks can no longer be copied or moved, helping prevent unintended duplication.
Quality Checks
The Linux Clang build now includes an additional static analysis check covering library, test, and example code.
* Test message parsing now validates numeric fields more strictly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->