From a1261296e48967b3236053d3435a3f521898df2f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 27 Nov 2014 17:21:34 +0100 Subject: [PATCH] Add auto-formatter script --- contrib/devtools/auto-format.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 contrib/devtools/auto-format.sh diff --git a/contrib/devtools/auto-format.sh b/contrib/devtools/auto-format.sh new file mode 100755 index 0000000000000..b7cf5854fefc4 --- /dev/null +++ b/contrib/devtools/auto-format.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ ! -f src/main.cpp ]; then + echo "This tool must be run from the project root directory." >&2 + exit 1 +fi + +cd src + +find . \( -name bip32_tests.cpp -o -name utilstrencodings.cpp -o -name chainparams.cpp -o -name chainparamsseed.h -o -name tinyformat.h -o -name qt -o -name leveldb -o -name univalue -o -name secp256k1 -o -name json \) -prune -o -name '*.h' -o -name '*.cpp' -print | while read FILE; do + clang-format-3.5 -style=file -i "$FILE" +done +