Files
managed-git/hooks/pre-push
2023-09-02 21:48:31 +01:00

18 lines
387 B
Python
Executable File

#!/usr/bin/python3
import subprocess
def check_fantomas():
result = subprocess.run(["dotnet", "fantomas", "--check", "."])
if result.returncode != 0:
print(result.stdout)
raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet fantomas .`")
def main():
check_fantomas()
if __name__ == "__main__":
main()