mirror of
https://github.com/Smaug123/managed-git
synced 2025-10-06 16:28:42 +00:00
18 lines
387 B
Python
Executable File
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()
|