Skip to content

Require clang-tidy 19 or later, and rename CLANG_TIDY_EXE - #252

Merged
derobins merged 1 commit into
developfrom
derobins/clang_tidy_fixup
Oct 17, 2026
Merged

derobins merged 1 commit into
developfrom
derobins/clang_tidy_fixup

Conversation

@derobins

Copy link
Copy Markdown
Collaborator

HIPOBJ_USE_CLANG_TIDY now rejects a clang-tidy older than 19, which can't read .clang-tidy, and fails to configure rather than warning when it finds none. It searches PATH for clang-tidy and versioned names (newest first) before falling back to ROCm's, which lacks the clang-analyzer-* checks. The variable that selects it is now HIPOBJ_CLANG_TIDY_EXE.

HIPOBJ_USE_CLANG_TIDY now rejects a clang-tidy older than 19, which
can't read .clang-tidy, and fails to configure rather than warning
when it finds none. It searches PATH for clang-tidy and versioned
names (newest first) before falling back to ROCm's, which lacks the
clang-analyzer-* checks. The variable that selects it is now
HIPOBJ_CLANG_TIDY_EXE.

Co-Authored-By: Claude <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Version validation, discovery, and updated references are consistent, with no unresolved findings.

No open issues 🎉

What changed in this PR

This PR makes hipObject’s clang-tidy configuration fail early when a compatible tool is unavailable.

Changes:

  • Require clang-tidy 19 or later and validate discovered or explicitly selected executables.
  • Search unversioned and versioned names before the ROCm fallback.
  • Rename the selector to HIPOBJ_CLANG_TIDY_EXE and update CI and documentation.
File Description
docs/​building.rst Documents discovery order and the renamed selector.
cmake/​HIPOBJClangTidy.cmake Adds version validation, discovery, and configuration errors.
CHANGELOG.md Records the requirement and variable rename.
AGENTS.md Updates clang-tidy selection guidance.
.github/​workflows/​hipobject-clang-tidy.yml Uses the renamed selector in CI.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

@derobins
derobins merged commit 5657f56 into develop Oct 17, 2026
26 checks passed
@derobins
derobins deleted the derobins/clang_tidy_fixup branch October 17, 2026 22:43
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