From 32c77aefbc2ef33d31171790d05ca190da66fcde Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Fri, 9 Aug 2019 13:35:44 +0300 Subject: [PATCH] Add scripts/format.sh Runs clang-format on all our C code --- scripts/format.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/format.sh diff --git a/scripts/format.sh b/scripts/format.sh new file mode 100755 index 0000000..d1391ce --- /dev/null +++ b/scripts/format.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -eu +cd "$(dirname "$0")"/.. +echo "Entering directory '$PWD'" +set -x +find . -name "[^.]*.[ch]" | sort | xargs clang-format -verbose -i