precommit: Add input file formatter

This commit is contained in:
Ole Schütt 2023-12-18 20:52:09 +01:00 committed by Ole Schütt
parent 152324274f
commit fafc0043f0
3 changed files with 190 additions and 0 deletions

View file

@ -224,6 +224,9 @@ def process_file(fn: str, allow_modifications: bool) -> None:
if re.match(r".*/Makefile", fn):
run_local_tool("./tools/precommit/format_makefile.py", fn)
if re.match(r".*\.inp$", fn):
run_local_tool("./tools/precommit/format_input_file.py", fn)
run_check_file_properties(fn)
new_content = Path(fn).read_bytes()