mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update stringtable_validator.py (#7841)
This commit is contained in:
parent
5c68f1dac3
commit
1be65a9125
@ -129,7 +129,7 @@ def check_stringtable(filepath):
|
|||||||
if line_clean.startswith("</key") or line_clean.startswith("</package") or line_clean.startswith("</project") or line_clean.startswith("</container"):
|
if line_clean.startswith("</key") or line_clean.startswith("</package") or line_clean.startswith("</project") or line_clean.startswith("</container"):
|
||||||
spacing_depth -= 4
|
spacing_depth -= 4
|
||||||
|
|
||||||
line_spacing = len(line) - len(line_clean)
|
line_spacing = len(line.lower()) - len(line_clean)
|
||||||
|
|
||||||
if line_spacing != spacing_depth:
|
if line_spacing != spacing_depth:
|
||||||
print(" ERROR: Incorrect number of indenting spaces on line {}, currently {}, should be {}.".format(line_number, line_spacing, spacing_depth))
|
print(" ERROR: Incorrect number of indenting spaces on line {}, currently {}, should be {}.".format(line_number, line_spacing, spacing_depth))
|
||||||
@ -162,13 +162,11 @@ def main():
|
|||||||
bad_count = 0
|
bad_count = 0
|
||||||
|
|
||||||
for filepath in stringtable_files:
|
for filepath in stringtable_files:
|
||||||
print("\nChecking {}:".format(os.path.relpath(filepath, root_dir)))
|
print("Checking {}:".format(os.path.relpath(filepath, root_dir)))
|
||||||
|
|
||||||
errors = check_stringtable(filepath)
|
errors = check_stringtable(filepath)
|
||||||
|
|
||||||
if errors == 0:
|
if errors != 0:
|
||||||
print("No errors found.")
|
|
||||||
else:
|
|
||||||
print("Found {} error(s).".format(errors))
|
print("Found {} error(s).".format(errors))
|
||||||
bad_count += 1
|
bad_count += 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user