blob: ebbd2c4851ddae46add9281f9ce70ed646510ae7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env python
import subprocess
output = subprocess.check_output(["git-clang-format", "HEAD~", "--diff"])
if output not in ['no modified files to format\n',
'clang-format did not modify any files\n']:
print(output)
print("The above patch to be applied to pass clang-format")
exit(1)
else:
exit(0)
|