You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "pnoltes (via GitHub)" <gi...@apache.org> on 2026/02/10 20:13:17 UTC
[PR] Feature/566 introduce clang tidy setup (celix)
pnoltes opened a new pull request, #834:
URL: https://github.com/apache/celix/pull/834
This PR introduces a **clang-tidy** setup for the project.
I know we previously introduced the GCC static analyzer, but was already testing **clang-tidy** in the background. A key benefit of clang-tidy is its compatibility with both Clang and GCC. Additionally, you do not need to perform a full compilation first, though clang-tidy does require the CMake-generated `compile_commands.json` file.
I have enabled most check groups but disabled individual checks that currently report issues. I expect we can enable almost all checks over time (if desired), though some will require further discussion.
### Potentially Problematic Checks:
* **cppcoreguidelines**: Almost all of these checks trigger on C headers included in C++. This might be solvable by wrapping `extern "C"` directives with `//NOLINTBEGIN(cppcoreguidelines-*)` and `//NOLINTEND(cppcoreguidelines-*)`.
* **readability-***: Some of these are highly opinionated. For example, `readability-identifier-naming` flags certain variable names as too short (e.g., `bnd`).
### CI/CD Integration
To run clang-tidy, I added a separate workflow. While it is possible to append a clang-tidy scan to an existing build job, doing so would extend the total execution time. Since clang-tidy only requires a CMake configuration, running it as a parallel job avoids increasing the overall build duration.
For local development, the `ENABLE_CLANG_TIDY` build option can be used to integrate the scan into the build process. While this is also possible on CI, I believe a single dedicated scan is sufficient.
The scan uses the `clang-tidy-sarif` tool to convert the output into a **SARIF report**. GitHub supports this format, though I am still confirming exactly how these results integrate into our specific GitHub environment (e.g., the Security tab).
### Final Notes:
* I have temporarily disabled the suppression of the `cert-dcl59-cpp` check so that there is are least some findings to report for testing purposes.
* The `cargo-bins/cargo-binstall` action is restricted in our organization, so `clang-tidy-sarif` is currently "installed" via `curl`. I have kept the action usage in comments for now. If we agree that clang-tidy is the right path forward and the `curl` approach is acceptable, I will remove the commented-out code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Feature/566 introduce clang tidy setup (celix)
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #834:
URL: https://github.com/apache/celix/pull/834#issuecomment-3880527405
## [Codecov](https://app.codecov.io/gh/apache/celix/pull/834?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 91.53%. Comparing base ([`a0562f8`](https://app.codecov.io/gh/apache/celix/commit/a0562f81d01b49feaa7dd9208771f19cd2ac0685?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b1382c4`](https://app.codecov.io/gh/apache/celix/commit/b1382c49570f1cbae88cff4cb8a46cf3ab8bc676?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #834 +/- ##
==========================================
+ Coverage 91.50% 91.53% +0.03%
==========================================
Files 235 235
Lines 28686 28686
==========================================
+ Hits 26248 26259 +11
+ Misses 2438 2427 -11
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/celix/pull/834?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Feature/566 introduce clang tidy setup (celix)
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on PR #834:
URL: https://github.com/apache/celix/pull/834#issuecomment-3880453290
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on [this overview](/apache/celix/security/code-scanning?query=pr%3A834+is%3Aopen). Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out [the documentation](https://docs.github.com/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org