Skip to content

Commit 4aaa5d6

Browse files
committed
clang-format-ompi: do not process fake header files
Open MPI has some "header" files that are really fotran includes but not named with the expected extension (these are non-standard and sometimes named with .fi for fortran include). They are not C header files so the clang-format script should not attempt to format these files. The result is a mess and will fail to compile. Open MPI should rename these files but for now they all have an emacs mode line we can use to filter them out. Signed-off-by: Nathan Hjelm <hjelmn@google.com>
1 parent 8b27377 commit 4aaa5d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/clang-format-ompi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "Running clang-format on code base..."
44

5-
files=($(git ls-tree -r master --name-only | grep -v '3rd-party/' | grep -v 'contrib' | grep -e '.*\.[ch]$'))
5+
files=($(git ls-tree -r master --name-only | grep -v '3rd-party/' | grep -v 'contrib' | grep -e '.*\.[ch]$' | xargs grep -L -- "-*- fortran -*-"))
66

77
for file in "${files[@]}" ; do
88
if test "$1" = "-d" ; then

0 commit comments

Comments
 (0)