From 27762923761fa360343dc87784eb9748de1fcac5 Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Tue, 28 Feb 2017 14:13:09 +0100 Subject: [PATCH] upd: improve format script MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - exec astyle to shave off a fork() - Align pointers to names. In int* a, b; only a is a pointer, b isn’t. The alignment to names, int *a, b; makes this clearer. - Don’t create backup files – everything’s under version control. - Don’t format the libraries, there’s no point in that. - Spell out the recursive option (long form), for readability and consistency with the other options (which we also spell out). Change-Id: Id87beb4351e8b63ae4c492b44f57d38561c2fc85 --- scripts/format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/format.sh b/scripts/format.sh index b8b7061..ada110a 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,2 +1,2 @@ #!/bin/sh -astyle --style=java --add-brackets --indent-col1-comments --break-blocks --pad-oper --pad-paren-in --unpad-paren --indent-namespaces --align-pointer=type --align-reference=type --convert-tabs --lineend=linux -r "*.cpp" "*.h" '*.hpp' +exec astyle --style=java --add-brackets --indent-col1-comments --break-blocks --pad-oper --pad-paren-in --unpad-paren --indent-namespaces --align-pointer=name --align-reference=type --convert-tabs --lineend=linux --suffix=none --exclude=lib --recursive "*.cpp" "*.h" '*.hpp' -- 2.47.3