mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-26 13:15:21 -04:00
precommit: fix check_file_properties
Calling it with multiple filenames was broken, revised and modernized the script in the process. The cloud-based precommit was running it on all files even though it was never intended to work on shell scripts. Fixed that as well.
This commit is contained in:
parent
5f69bebd65
commit
f511d51f6f
2 changed files with 120 additions and 117 deletions
|
|
@ -200,7 +200,8 @@ def process_file(fn, allow_modifications):
|
|||
if re.match(r"./data/.*POTENTIALS?$", fn):
|
||||
check_data_files()
|
||||
|
||||
run_check_file_properties(fn)
|
||||
if re.match(r".*\.(F|fypp|c|cu|cpp|h|hpp)$", fn):
|
||||
run_check_file_properties(fn)
|
||||
|
||||
new_content = Path(fn).read_bytes()
|
||||
if new_content == orig_content:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue