From dc27b2c74ef36b1b5bd1479a7fdace3d719895ef Mon Sep 17 00:00:00 2001 From: versat Date: Thu, 7 Feb 2019 08:31:36 +0100 Subject: [PATCH] runastyle: Fix wildcard expansion happening too soon 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 bce342474d0..03726e7260a 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"