chore(lv_conf_template): replace tab with space (#7736)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX
2025-02-10 16:41:16 +08:00
committed by GitHub
parent b15107eec5
commit 815b24ffb2
3 changed files with 52 additions and 36 deletions

View File

@@ -16,6 +16,22 @@ if sys.version_info < (3,6,0):
print("Python >=3.6 is required", file=sys.stderr)
exit(1)
def check_for_tabs(file_path):
errors = []
with open(file_path, 'r') as file:
for line_number, line in enumerate(file, 1):
if '\t' in line:
errors.append(f" {file_path}:{line_number}")
if errors:
print(f"Tabs found in the following files:", file=sys.stderr)
for error in errors:
print(error, file=sys.stderr)
print("Please replace tabs with spaces.", file=sys.stderr)
exit(1)
check_for_tabs(LV_CONF_TEMPLATE)
fin = open(LV_CONF_TEMPLATE)
fout = open(LV_CONF_INTERNAL, "w", newline='')