Enable clang-tidy tooling - #91
colin-higgins wants to merge 6 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e200618b64
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| clang-tidy: | ||
| runs-on: ubuntu-22.04 | ||
| container: | ||
| image: ghcr.io/datadog/httpd-datadog/devcontainer:main |
There was a problem hiding this comment.
Install clang-tidy in the CI container
This image is built from .devcontainer/Dockerfile, whose apk add list installs clang and llvm but not the extra-tools package that provides clang-tidy. Every new pull-request job therefore reaches scripts/clang-tidy.sh, fails its tool lookup, and exits before doing any analysis. Install clang-tidy in the devcontainer image or in this job.
Useful? React with 👍 / 👎.
| mapfile -t files < <(find mod_datadog/ test/unit-test/ \ | ||
| -type f \( -name '*.cpp' -o -name '*.c' \)) |
There was a problem hiding this comment.
Analyze the RUM translation units
The ci-dev preset leaves HTTPD_DATADOG_ENABLE_RUM off, so CMake does not add the RUM sources to mod_datadog and creates no compile-command entries for them. This find still passes all three RUM files to clang-tidy; clang-tidy skips files without a matching compile command and returns success. As a result, changes under mod_datadog/src/rum are silently excluded from the new PR check. Generate a RUM-enabled compilation database for this job, or explicitly limit the check to the configured source set.
Useful? React with 👍 / 👎.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The two failures don't seem related. |
xlamorlette-datadog
left a comment
There was a problem hiding this comment.
Before handling this PR, we should finalize the mother PR in dd-trace-cpp: DataDog/dd-trace-cpp#372.
Indeed! This has been fixed. |
Add a shared clang-tidy baseline and a CI job that fails on findings, so PRs cannot merge with tidy violations.