summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts/clang-format.py
blob: 9bea1dafff7d740e6e1febd3e62ee6fc89211a4b (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", "HEAD~", "--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)