diff options
author | Nigel Babu <nigelb@redhat.com> | 2018-05-23 14:18:06 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-09-12 12:04:55 +0000 |
commit | 650221edcf571186aa60ae515ccb21e86eedeb5e (patch) | |
tree | af69ca35fd4fd99a96a586c4c7520269b7ec533d /build-gluster-org/scripts | |
parent | b2f4a92e4476c3c4ba297c27e1ed71a38e3d2e11 (diff) |
Add clang-format job
Change-Id: I4fce662da7f82c113123906339c5984a4e99a2b2
Diffstat (limited to 'build-gluster-org/scripts')
-rw-r--r-- | build-gluster-org/scripts/clang-format.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build-gluster-org/scripts/clang-format.py b/build-gluster-org/scripts/clang-format.py new file mode 100644 index 0000000..7621bf9 --- /dev/null +++ b/build-gluster-org/scripts/clang-format.py @@ -0,0 +1,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) + |