Add peripheral stuff

This commit is contained in:
Smaug123
2021-12-24 18:49:47 +00:00
parent 910a75d18e
commit 2be5effbe2
5 changed files with 89 additions and 0 deletions

17
hooks/pre-push Normal file
View File

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