diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-01 07:58:22 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-01 07:58:22 +0300 |
commit | e7eced3c87310b15ac20cc3cd470d67686104a14 (patch) | |
tree | fa5e315b7507031fbd9dfb28ac451995718aed94 /scripts/code_tools | |
parent | d48497268eef5738e2af8549d8962b281c6b4c71 (diff) |
#824 Don't fix tabs in files with no tabs
Diffstat (limited to 'scripts/code_tools')
-rw-r--r-- | scripts/code_tools/fix_whitespace.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/code_tools/fix_whitespace.py b/scripts/code_tools/fix_whitespace.py index 37e15c6d10..91e82f26f4 100644 --- a/scripts/code_tools/fix_whitespace.py +++ b/scripts/code_tools/fix_whitespace.py @@ -33,6 +33,10 @@ def convert_tabs_to_spaces(file_path, tab_stop): with open(file_path, 'r') as file: lines = file.readlines() + # Skip files with no tabs + if not any('\t' in line for line in lines): + return + new_lines = [] for line in lines: # Remove trailing spaces |