From 09c4508aee96ca20d084b8a60b4c6603de8bff8b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 25 Nov 2018 13:01:17 +0100 Subject: Add Session Dialog --- tools/format-code.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 tools/format-code.sh (limited to 'tools') diff --git a/tools/format-code.sh b/tools/format-code.sh new file mode 100755 index 0000000..68be1d8 --- /dev/null +++ b/tools/format-code.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# get names of staged files | filter out the header and cpp files | clang-format them +git diff --staged --name-only | grep --regex="\.h\|\.cpp" | xargs clang-format -i -- cgit v1.2.1