-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Switch clang tools from static binaries to wheels #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughReplaces static-binaries fallback with Python wheel-based clang tools in README and action configuration; removes the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-08-13T09:33:35.208ZApplied to files:
📚 Learning: 2025-08-17T12:34:25.463ZApplied to files:
📚 Learning: 2025-08-17T12:50:57.038ZApplied to files:
📚 Learning: 2025-08-17T12:31:25.319ZApplied to files:
📚 Learning: 2025-08-17T12:34:25.463ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (4)
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. Comment |
Cpp-Linter Report
|
2bndy5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with deprecated any version of clang-tidy before v13.
| description: | | ||
| The desired version of the [clang-tools](https://github.com/cpp-linter/clang-tools-pip) to use. | ||
| Accepted options are strings which can be 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10 or 9. | ||
| clang-tidy only supports versions 13 and above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woah! I thought we would fallback to the static binaries for this.
FYI, nushell can convert string to integers:
let version = "${{ inputs.version }}" | into intAnd, if you need to convert the integer to a string:
let ver_str = $"v($version)"That way you can do comparisons like $version >= 13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README changes should be reverted now that we have backward compatibility.
|
I think there's a bug in clang-tools-pip. It does not seem to match v9.0.0. Probably a logical error ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
action.yml(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 2bndy5
Repo: cpp-linter/cpp-linter-action PR: 314
File: action.yml:394-416
Timestamp: 2025-08-17T12:34:25.463Z
Learning: In the cpp-linter-action project, technical improvements can be deferred to separate PRs when they're not critical to the current changes, especially when the current implementation is known to work correctly.
Learnt from: 2bndy5
Repo: cpp-linter/cpp-linter-action PR: 314
File: README.md:206-211
Timestamp: 2025-08-17T13:20:51.048Z
Learning: For GitHub Actions documentation references in cpp-linter-action, prefer stable workflow syntax documentation links over "canonical" specialized pages that may redirect, as the comprehensive workflow syntax page provides better context and examples for container configuration.
Learnt from: 2bndy5
Repo: cpp-linter/cpp-linter-action PR: 306
File: .readthedocs.yaml:9-16
Timestamp: 2025-08-13T09:33:35.208Z
Learning: Read the Docs v2 config supports `tools.python: latest` as a valid value, not just explicit version strings like "3.12". This was confirmed by a successful build in cpp-linter-action project.
📚 Learning: 2025-08-17T12:34:25.463Z
Learnt from: 2bndy5
Repo: cpp-linter/cpp-linter-action PR: 314
File: action.yml:394-416
Timestamp: 2025-08-17T12:34:25.463Z
Learning: The cpp-linter/cpp-linter-action repository manages the downstream parsing of command-line arguments through their own cpp-linter/cpp-linter project, so passing empty string values for flags like --extra-arg="" is acceptable and known to work in their implementation.
Applied to files:
action.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: test (macos-latest, 20)
- GitHub Check: test (windows-latest, 21)
- GitHub Check: test (windows-latest, 13)
- GitHub Check: test (windows-latest, 10)
- GitHub Check: test (macos-latest, 19)
- GitHub Check: test (macos-latest, 15)
- GitHub Check: test (macos-latest, 9)
- GitHub Check: test (ubuntu-latest, 15)
🔇 Additional comments (2)
action.yml (2)
43-43: Documentation update is clear and helpful.The added constraint note aligns with the fallback logic implemented in the installation step and sets proper user expectations.
388-396: Tool selection logic is clean and efficient.Only clang-tidy and clang-format are installed when actually needed based on inputs, avoiding unnecessary installation overhead.
Apparently, there are only wheels for linux from clang-format v9 (or older) PyPI package: JSON API response snippet
"6.0.1": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e371db01cf5d188d0669af9cfd9f5cf8cfb47898df6ad5c86bc008ab3b73d327",
"md5": "fe41668bfa155409944fc6e7dc060b42",
"sha256": "1b71b62346e281f96aa9d45a8892427ce1eae7783c24ac0e1efbab1d5340748d"
},
"downloads": -1,
"filename": "clang_format-6.0.1-py2-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "fe41668bfa155409944fc6e7dc060b42",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 1285495,
"upload_time": "2019-11-04T14:55:48",
"upload_time_iso_8601": "2019-11-04T14:55:48.150563Z",
"url": "https://files.pythonhosted.org/packages/e3/71/db01cf5d188d0669af9cfd9f5cf8cfb47898df6ad5c86bc008ab3b73d327/clang_format-6.0.1-py2-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "166065c642879f290c4233ac75d7f91038509750347271cd135a62cf0b86019c",
"md5": "cd777571cebf4190bc04ed4638d68bfd",
"sha256": "8028c358d0838e83ea85254bedba846f2106348406c9cdc4f2724779704eedca"
},
"downloads": -1,
"filename": "clang_format-6.0.1-py2.py3-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "cd777571cebf4190bc04ed4638d68bfd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1295165,
"upload_time": "2019-11-09T15:05:57",
"upload_time_iso_8601": "2019-11-09T15:05:57.500683Z",
"url": "https://files.pythonhosted.org/packages/16/60/65c642879f290c4233ac75d7f91038509750347271cd135a62cf0b86019c/clang_format-6.0.1-py2.py3-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"7.1.0": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1728feeb87d11c17d4734763db4c0a1a6939448f0c11a1713fac142e8dd2f107",
"md5": "ca817583469776c6b76aee6e8d058e8d",
"sha256": "32629996956b3e34494a926a76835e3371f10c2823c3078f5fbef08bfebbaae7"
},
"downloads": -1,
"filename": "clang_format-7.1.0-py2.py3-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "ca817583469776c6b76aee6e8d058e8d",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1330841,
"upload_time": "2019-11-09T16:17:01",
"upload_time_iso_8601": "2019-11-09T16:17:01.797915Z",
"url": "https://files.pythonhosted.org/packages/17/28/feeb87d11c17d4734763db4c0a1a6939448f0c11a1713fac142e8dd2f107/clang_format-7.1.0-py2.py3-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"8.0.1": [
{
"comment_text": "",
"digests": {
"blake2b_256": "376675e3c14f22c8a7a02c7e337547e29d42bed516ba8067fdef87d3d9346e52",
"md5": "2053ad2ea07c26dd5ad62cb7999722d7",
"sha256": "d3d0d62281ace883bc6e4188f949308b8f2e4f6de8fac463e5abd1ae02c03db6"
},
"downloads": -1,
"filename": "clang_format-8.0.1-py2.py3-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "2053ad2ea07c26dd5ad62cb7999722d7",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1377569,
"upload_time": "2019-11-20T18:37:41",
"upload_time_iso_8601": "2019-11-20T18:37:41.956369Z",
"url": "https://files.pythonhosted.org/packages/37/66/75e3c14f22c8a7a02c7e337547e29d42bed516ba8067fdef87d3d9346e52/clang_format-8.0.1-py2.py3-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"9.0.0": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25f2d989afaf8a91385f18fd06e6202644be0bc3a1d14548c18a8ece4911e005",
"md5": "7b0f1d7a2785a5c2c4e9d695dfdf4583",
"sha256": "085342f9e238c9b03a019e20ec23f242f8795a3cca9296ab2427b1dea45e7014"
},
"downloads": -1,
"filename": "clang_format-9.0.0-py2.py3-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "7b0f1d7a2785a5c2c4e9d695dfdf4583",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1375189,
"upload_time": "2019-11-20T19:37:14",
"upload_time_iso_8601": "2019-11-20T19:37:14.542044Z",
"url": "https://files.pythonhosted.org/packages/25/f2/d989afaf8a91385f18fd06e6202644be0bc3a1d14548c18a8ece4911e005/clang_format-9.0.0-py2.py3-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
] |
cc0b06f to
29a60ef
Compare
Co-authored-by: Brendan <[email protected]>
Co-authored-by: Brendan <[email protected]>
closes #364
Summary by CodeRabbit
Documentation
Chores