File: format_source

package info (click to toggle)
hdf5 1.10.8%2Brepack1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 129,408 kB
  • sloc: ansic: 550,968; f90: 30,062; java: 29,280; sh: 22,214; xml: 18,115; cpp: 17,317; perl: 2,514; makefile: 2,176; yacc: 328; javascript: 203; lex: 146; ruby: 24; csh: 17
file content (26 lines) | stat: -rwxr-xr-x 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#
# Recursively format all C & C++ sources and header files, except those in the
# 'config' directory and generated files, such as H5LTanalyze.c, etc.
#
# Note that any files or directories that are excluded here should also be
# added to the 'exclude' list in .github/workflows/clang-format-check.yml
#
# (Remember to update both bin/format_source and bin/format_source_patch)

find . \( -type d -path ./config -prune -and -not -path ./config \) \
    -or \( \( \! \( \
        -name H5LTanalyze.c \
        -or -name H5LTparse.c \
        -or -name H5LTparse.h \
        -or -name H5Epubgen.h \
        -or -name H5Einit.h \
        -or -name H5Eterm.h \
        -or -name H5Edefin.h \
        -or -name H5version.h \
        -or -name H5overflow.h \
        \) \) \
    -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
    | xargs clang-format -style=file -i -fallback-style=none

exit 0