summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts/clang-format.py
blob: 7621bf9efa0b7c11880310f9ca98f5ae725bfb28 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python

import subprocess
output = subprocess.check_output(["git", "clang-format", "--diff"])

if output not in ['no modified files to format\n', 'clang-format did not modify any files\n']:
    print "Run git clang-format, then commit.\n"
    exit(1)
else:
    exit(0)