Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/update_clang_format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Run clang-format across shared C and C++ source directories."""
"""Run clang-format across shared C, C++, Objective-C, and CUDA source directories."""

# standard imports
import os
Expand All @@ -15,6 +15,7 @@
'c',
'cpp',
'cu',
'cuh',
'h',
'hpp',
'm',
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/test_update_clang_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ def test_directories_include_expected_roots():


def test_file_types_include_shared_extensions():
"""Verify the formatter includes shared C and C++ extensions."""
"""Verify the formatter includes shared source extensions."""

assert update_clang_format.file_types == [
'c',
'cpp',
'cu',
'cuh',
'h',
'hpp',
'm',
Expand Down Expand Up @@ -65,6 +66,7 @@ def test_main_formats_supported_files_only(monkeypatch, tmp_path):
files = [
os.path.join(tmp_root, 'src', 'main.cpp'),
os.path.join(tmp_root, 'src', 'nested', 'kernel.cu'),
os.path.join(tmp_root, 'src', 'nested', 'kernel.cuh'),
os.path.join(tmp_root, 'tests', 'test_helper.mm'),
os.path.join(tmp_root, 'tools', 'tool.h'),
os.path.join(tmp_root, 'tools', 'notes.txt'),
Expand All @@ -90,6 +92,7 @@ def fake_clang_format(file):
assert set(formatted_files) == {
'src/main.cpp',
'src/nested/kernel.cu',
'src/nested/kernel.cuh',
'tests/test_helper.mm',
'tools/tool.h',
}
Loading