Files
medical-mall/check_one.py
2026-02-26 08:46:33 +08:00

21 lines
624 B
Python

import sys
def check_file(file_path):
print(f"Checking {file_path}")
try:
content = open(file_path, 'r', encoding='utf-8').read()
tags = ['template', 'script', 'style', 'view', 'text', 'image', 'scroll-view', 'component', 'slot', 'input', 'textarea']
# Simple count check
for tag in tags:
o_count = content.count(f'<{tag}')
c_count = content.count(f'</{tag}>')
print(f" {tag}: open={o_count}, close={c_count}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
check_file(sys.argv[1])