This commit is contained in:
Smaug123
2022-12-31 13:09:11 +00:00
commit 3d08a4912a
15 changed files with 884 additions and 0 deletions

16
hooks/pre-push Executable file
View File

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