]>
git.ipfire.org Git - thirdparty/pdns.git/blob - build-scripts/format-code
4 # Reformat code, but do not touch if no changes.
5 # Report if a files was changed.
8 if [ "$0" != "./build-scripts/format-code" ]; then
9 echo "Please run me from the root checkout dir"
13 if [ ! -e .clang-format
]; then
14 echo "No .clang-format file found in .";
18 for file in "${@}"; do
19 if ! clang-format
-style=file "$file" > "$file.xxx"; then
22 if ! cmp -s "$file" "$file.xxx"; then
23 echo "$file reformatted"
24 mv "$file.xxx" "$file"