summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
commit7c742a851847997f5e931f3d448b368c3179de32 (patch)
tree8908e35a0110298e3fc3e29120481e05798d5500 /bin
parent43ce4b5e6e5eb4e848bf1726252f1ca17212e545 (diff)
downloadhdf5-7c742a851847997f5e931f3d448b368c3179de32.zip
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.gz
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.bz2
Add clang-format changes from develop.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/format_source6
-rwxr-xr-xbin/format_source_patch14
2 files changed, 20 insertions, 0 deletions
diff --git a/bin/format_source b/bin/format_source
new file mode 100755
index 0000000..b0b695c
--- /dev/null
+++ b/bin/format_source
@@ -0,0 +1,6 @@
+#!/bin/bash
+find . -type d \( -path ./config \) -prune \
+ -o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+exit 0 \ No newline at end of file
diff --git a/bin/format_source_patch b/bin/format_source_patch
new file mode 100755
index 0000000..4c531ea
--- /dev/null
+++ b/bin/format_source_patch
@@ -0,0 +1,14 @@
+#!/bin/bash
+find . -type d \( -path ./config \) -prune \
+ -o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+git diff > clang_format.patch
+
+# Delete if 0 size
+if [ ! -s clang_format.patch ]
+then
+ rm clang_format.patch
+fi
+
+exit 0 \ No newline at end of file