Skip to content
Snippets Groups Projects
Commit cf1c0c03 authored by Campbell Barton's avatar Campbell Barton
Browse files

clang_format_paths: also retab shell scripts

parent 25991436
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,10 @@ extensions = ( ...@@ -19,9 +19,10 @@ extensions = (
".osl", ".glsl", ".osl", ".glsl",
) )
extensions_cmake = ( extensions_only_retab = (
".cmake", ".cmake",
"CMakeLists.txt", "CMakeLists.txt",
".sh",
) )
ignore_files = { ignore_files = {
...@@ -175,14 +176,14 @@ def main(): ...@@ -175,14 +176,14 @@ def main():
] ]
# Always operate on all cmake files (when expanding tabs and no paths given). # Always operate on all cmake files (when expanding tabs and no paths given).
files_cmake = [ files_retab = [
f for f in source_files_from_git("." if use_default_paths else paths) f for f in source_files_from_git("." if use_default_paths else paths)
if f.endswith(extensions_cmake) if f.endswith(extensions_only_retab)
if f not in ignore_files if f not in ignore_files
] ]
if args.expand_tabs: if args.expand_tabs:
convert_tabs_to_spaces(files + files_cmake) convert_tabs_to_spaces(files + files_retab)
clang_format(files) clang_format(files)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment