Skip to content

chore(clang-tidy): address findings and suppress false positives - #1021

Merged
marcpaterno merged 1 commit into
Framework-R-D:mainfrom
knoepfel:chore/clang-tidy-fixes
Oct 29, 2026
Merged

marcpaterno merged 1 commit into
Framework-R-D:mainfrom
knoepfel:chore/clang-tidy-fixes

Conversation

@knoepfel

@knoepfel knoepfel commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

These PR addresses clang-tidy warnings that have crept in.

  • Clang-tidy: Disabled the noisy portability-template-virtual-member-function check and excluded bits/ headers from misc-include-cleaner.
  • Code quality: Removed unused includes, omitted redundant member initializers, and applied const-correctness fixes. Added targeted suppressions for const-correctness and a clang-analyzer leak false positive.
  • Tests: Added direct phlex/model/fwd.hpp includes and made the test random-number generator explicitly static thread_local.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b3b4e53d-9add-4878-9be5-06ea32ad38c8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ec5a5f82-53b9-452a-baae-2f57ea9519b4
Commits

Reviewing files that changed from the base of the PR and between 38906b6 and 611dd0b.

Files selected for processing: 12
  • .clang-tidy
  • form/persistence/persistence_reader.cpp
  • phlex/core/framework_graph.hpp
  • phlex/model/fixed_hierarchy.cpp
  • plugins/generate_layers.cpp
  • plugins/python/src/modulewrap.cpp
  • test/accumulator_test.cpp
  • test/form/cell_number_vector.cpp
  • test/form/form_basics_test.cpp
  • test/multilayer_join_test.cpp
  • test/replicated_test.cpp
  • test/yielding_driver_test.cpp
Files with no reviewable changes: 2
  • plugins/generate_layers.cpp
  • test/multilayer_join_test.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 7
  • GitHub Check: build (gcc, none, amd64, ubuntu-24.04)
  • GitHub Check: build (gcc, none, arm64, ubuntu-24.04-arm)
  • GitHub Check: Analyze cpp with CodeQL
  • GitHub Check: CodeRabbit
  • GitHub Check: clang-tidy-check
  • GitHub Check: coverage (amd64)
  • GitHub Check: coverage (arm64)
Additional context used
Code guidelines: 3
docs/dev/clang-tidy-fixes-2026-04.md — auto-discovered
.github/copilot-instructions.md — auto-discovered
AGENTS.md — auto-discovered
Path-based instructions: 3
Applicability reference: AGENTS.md: # Phlex — Kilo Agent Instructions **Authoritative sources**: `.clang-format` and `.clang-tidy` are the ground truth for formatting and naming.

CodeRabbit inference engine (docs/dev/clang-tidy-fixes-2026-04.md)

Files:

  • plugins/python/src/modulewrap.cpp
Source excerpt: Use clang-format tool for all C++ code (VS Code auto-formats on save)

CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • test/accumulator_test.cpp
  • phlex/model/fixed_hierarchy.cpp
  • plugins/python/src/modulewrap.cpp
  • test/form/form_basics_test.cpp
  • test/yielding_driver_test.cpp
  • test/form/cell_number_vector.cpp
  • test/replicated_test.cpp
  • phlex/core/framework_graph.hpp
  • form/persistence/persistence_reader.cpp
Source excerpt: Header files: `.hpp`; implementation: `.cpp`; tests: `*_test.cpp`

CodeRabbit inference engine (AGENTS.md)

Files:

  • test/accumulator_test.cpp
  • phlex/model/fixed_hierarchy.cpp
  • plugins/python/src/modulewrap.cpp
  • test/form/form_basics_test.cpp
  • test/yielding_driver_test.cpp
  • test/form/cell_number_vector.cpp
  • test/replicated_test.cpp
  • phlex/core/framework_graph.hpp
  • form/persistence/persistence_reader.cpp
Learnings: 1
Common learnings
Learnt from: knoepfel
Repo: Framework-R-D/phlex PR: 907
File: :0-0
Timestamp: 2026-10-03T18:01:39.822Z
Learning: In Framework-R-D/phlex, clang-tidy is the authority for deciding which header files C++ code should include. Do not request header-inclusion changes based on preferences that conflict with clang-tidy.
Additional comments: 10
.clang-tidy: 1

30-30: LGTM!

Also applies to: 118-118

phlex/model/fixed_hierarchy.cpp: 1

29-30: LGTM!

test/form/form_basics_test.cpp: 1

1789-1790: LGTM!

form/persistence/persistence_reader.cpp: 1

28-28: LGTM!

phlex/core/framework_graph.hpp: 1

223-223: LGTM!

Also applies to: 227-227

plugins/python/src/modulewrap.cpp: 1

356-356: LGTM!

test/accumulator_test.cpp: 1

4-4: LGTM!

test/form/cell_number_vector.cpp: 1

61-61: LGTM!

test/replicated_test.cpp: 1

24-24: LGTM!

test/yielding_driver_test.cpp: 1

2-2: LGTM!

Walkthrough

The PR updates clang-tidy settings, removes unused includes, adjusts initialization and const/static declarations, adds forward-declaration includes, and adds targeted analyzer suppressions.

Changes: Lint and source cleanup

Layer / File(s) Summary
Lint rules and targeted suppressions
.clang-tidy, phlex/model/fixed_hierarchy.cpp, test/form/form_basics_test.cpp
The clang-tidy configuration changes two rules. The source and test code add targeted lint and analyzer suppressions.
Source declarations and includes
form/persistence/persistence_reader.cpp, phlex/core/framework_graph.hpp, plugins/generate_layers.cpp, plugins/python/src/modulewrap.cpp
The changes remove unused includes and adjust member initialization and local const qualification.
Test declarations and includes
test/accumulator_test.cpp, test/form/cell_number_vector.cpp, test/multilayer_join_test.cpp, test/replicated_test.cpp, test/yielding_driver_test.cpp
Tests add forward-declaration includes, remove unused includes, and adjust generator and local declarations.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: aolivier23, greenc-fnal

Merge Risk: Minimal · previous review 611dd

The cleanup changes are ready to merge with no identified current-head risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely summarizes the pull request. It identifies the clang-tidy focus and the two main change types: addressing findings and suppressing false positives.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 9 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@knoepfel
knoepfel force-pushed the chore/clang-tidy-fixes branch from 611dd0b to 15c22c3 Compare October 29, 2026 04:34
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main    #1021      +/-   ##
==========================================
- Coverage   89.58%   89.58%   -0.01%     
==========================================
  Files         177      177              
  Lines        6012     6010       -2     
  Branches      994      994              
==========================================
- Hits         5386     5384       -2     
  Misses        397      397              
  Partials      229      229              
Flag Coverage Δ
amd64 89.58% <100.00%> (-0.01%) ⬇️
arm64 89.58% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/persistence/persistence_reader.cpp 90.90% <100.00%> (-0.52%) ⬇️
form/persistence/persistence_reader.hpp 100.00% <ø> (ø)
phlex/core/framework_graph.hpp 100.00% <ø> (ø)
phlex/model/fixed_hierarchy.cpp 97.61% <ø> (ø)
plugins/generate_layers.cpp 100.00% <ø> (ø)
plugins/python/src/modulewrap.cpp 77.68% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38906b6...d9e5944. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@knoepfel
knoepfel force-pushed the chore/clang-tidy-fixes branch from 15c22c3 to 9675ab0 Compare October 29, 2026 04:48
Remove unused includes and redundant initialization, add direct
declaration includes, and improve const correctness.

Disable noisy template virtual-function portability diagnostics and
ignore libstdc++ internal headers in include-cleaner. Add targeted
suppressions for const-correctness and the sanitizer-checked FORM
writer leak false positive.
@knoepfel
knoepfel force-pushed the chore/clang-tidy-fixes branch from 9675ab0 to d9e5944 Compare October 29, 2026 05:49
@marcpaterno
marcpaterno merged commit 89d6191 into Framework-R-D:main Oct 29, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants