From 3b98f08ac240b7ea889c47c2de037e812965f13d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 7 Feb 2019 08:52:20 +0100 Subject: [PATCH] runastyle: Fix wildcard expansion happening too soon (#1650) At least under Windows with Cygwin i see a problem. For lines like `formatCplusplus lib/*.cpp` the wildcard is replaced by ONE filename before the function is called. This results in only one file being formatted in the corresponding directory. The fix seems quite simple. Just use quotes for all function parameters like this: `formatCplusplus "lib/*.cpp"` The wildcard is preserved and only extended in the function body, so all matching files get formatted. --- runastyle | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runastyle b/runastyle index bce342474..03726e726 100755 --- a/runastyle +++ b/runastyle @@ -26,20 +26,20 @@ function formatCplusplusRecursive { "$ASTYLE" --options=$RCFILE --recursive "$1" } -formatCplusplus cli/*.cpp -formatCplusplus cli/*.h -formatCplusplus democlient/*.cpp -formatCplusplus gui/*.cpp -formatCplusplus gui/*.h +formatCplusplus "cli/*.cpp" +formatCplusplus "cli/*.h" +formatCplusplus "democlient/*.cpp" +formatCplusplus "gui/*.cpp" +formatCplusplus "gui/*.h" formatCplusplusRecursive "gui/test/*.cpp" formatCplusplusRecursive "gui/test/*.h" -formatCplusplus lib/*.cpp -formatCplusplus lib/*.h -formatCplusplus test/*.cpp -formatCplusplus test/cfg/*.c -formatCplusplus test/cfg/*.cpp -formatCplusplus test/*.h -formatCplusplus tools/*.cpp +formatCplusplus "lib/*.cpp" +formatCplusplus "lib/*.h" +formatCplusplus "test/*.cpp" +formatCplusplus "test/cfg/*.c" +formatCplusplus "test/cfg/*.cpp" +formatCplusplus "test/*.h" +formatCplusplus "tools/*.cpp" formatCplusplusRecursive "tools/*.h" formatCplusplusRecursive "samples/*.c" formatCplusplusRecursive "samples/*.cpp"