[CI] enable code-format-helper for .cl files (#135748)
In clang-format, OpenCL .cl file uses default C++ formatting. There are many pull-requests in libclc project that change OpenCL files. It is beneficial to enable clang-format for them in CI.
This commit is contained in:
parent
bb5f53c727
commit
cf2399a2ee
@ -186,7 +186,17 @@ class ClangFormatHelper(FormatHelper):
|
|||||||
filtered_files = []
|
filtered_files = []
|
||||||
for path in changed_files:
|
for path in changed_files:
|
||||||
_, ext = os.path.splitext(path)
|
_, ext = os.path.splitext(path)
|
||||||
if ext in (".cpp", ".c", ".h", ".hpp", ".hxx", ".cxx", ".inc", ".cppm"):
|
if ext in (
|
||||||
|
".cpp",
|
||||||
|
".c",
|
||||||
|
".h",
|
||||||
|
".hpp",
|
||||||
|
".hxx",
|
||||||
|
".cxx",
|
||||||
|
".inc",
|
||||||
|
".cppm",
|
||||||
|
".cl",
|
||||||
|
):
|
||||||
filtered_files.append(path)
|
filtered_files.append(path)
|
||||||
elif ext == "" and self.should_include_extensionless_file(path):
|
elif ext == "" and self.should_include_extensionless_file(path):
|
||||||
filtered_files.append(path)
|
filtered_files.append(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user