[CI] Enable clang-tidy in precommit#21234
Open
KornevNikita wants to merge 1 commit intointel:syclfrom
Open
Conversation
I'm not sure if clang-tidy passes on all PRs, so for now introducing with continue-on-error (meaning it will be green even in case of failure).
| run-clang-tidy: | ||
| runs-on: [Linux, build] | ||
| container: | ||
| image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest |
Check failure
Code scanning / zizmor
unpinned image references Error
Comment on lines
+15
to
+19
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
| with: | ||
| sparse-checkout: | | ||
| devops/actions | ||
| devops/scripts |
Check warning
Code scanning / zizmor
credential persistence through GitHub Actions artifacts Warning
sarnex
reviewed
Feb 6, 2026
Contributor
sarnex
left a comment
There was a problem hiding this comment.
cool change, just a few comments
|
|
||
| # Remove gcc-specific flags | ||
| perl -0777 -pe ' | ||
| s/(?:^|[ \t])\-Wno-class-memaccess(?=$|[ \t])//g; |
Contributor
There was a problem hiding this comment.
Instead of doing this could we just use clang, even just some system package manager installed one, to run configure?
| from typing import Iterator | ||
|
|
||
| EXCLUDE_PATH_RE = re.compile(r"(?:^|/)(test|test-e2e|unittests)(?:/|$)") | ||
|
|
Contributor
There was a problem hiding this comment.
nit: two lines inbetween instead of one in a few places
| if: steps.should_run_tidy.outputs.run == 'true' | ||
| run: | | ||
| # Remove commands containing "-D__INTEL_PREVIEW_BREAKING_CHANGES" to avoid running on the same file twice. | ||
| jq '[ .[] | select(.command | contains("-D__INTEL_PREVIEW_BREAKING_CHANGES") | not) ]' $GITHUB_WORKSPACE/build/compile_commands.json > $GITHUB_WORKSPACE/build/compile_commands.temp.json |
Contributor
There was a problem hiding this comment.
Could we just pass -DSYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB=Off instead of doing this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure if clang-tidy passes on all PRs, so for now introducing with continue-on-error (meaning it will be green even in case of failure).