mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 05:35:28 -04:00
Precommit: Format spack packages with upstream style
This commit is contained in:
parent
899741eeca
commit
6d377b8c9f
5 changed files with 31 additions and 73 deletions
|
|
@ -216,7 +216,10 @@ def process_file(fn: str, allow_modifications: bool) -> None:
|
|||
|
||||
if re.match(r"(.*/PACKAGE)|(.*\.py)$", fn):
|
||||
ast.parse(orig_content, filename=fn)
|
||||
run_remote_tool("black", fn)
|
||||
if "tools/spack/packages" in fn:
|
||||
run_remote_tool("spackformat", fn)
|
||||
else:
|
||||
run_remote_tool("black", fn)
|
||||
|
||||
if re.match(r".*\.sh$", fn):
|
||||
run_remote_tool("shfmt", fn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue