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.
This commit is contained in:
Sebastian 2019-02-07 08:52:20 +01:00 committed by amai2012
parent 7025254c26
commit 3b98f08ac2
1 changed files with 12 additions and 12 deletions

View File

@ -26,20 +26,20 @@ function formatCplusplusRecursive {
"$ASTYLE" --options=$RCFILE --recursive "$1" "$ASTYLE" --options=$RCFILE --recursive "$1"
} }
formatCplusplus cli/*.cpp formatCplusplus "cli/*.cpp"
formatCplusplus cli/*.h formatCplusplus "cli/*.h"
formatCplusplus democlient/*.cpp formatCplusplus "democlient/*.cpp"
formatCplusplus gui/*.cpp formatCplusplus "gui/*.cpp"
formatCplusplus gui/*.h formatCplusplus "gui/*.h"
formatCplusplusRecursive "gui/test/*.cpp" formatCplusplusRecursive "gui/test/*.cpp"
formatCplusplusRecursive "gui/test/*.h" formatCplusplusRecursive "gui/test/*.h"
formatCplusplus lib/*.cpp formatCplusplus "lib/*.cpp"
formatCplusplus lib/*.h formatCplusplus "lib/*.h"
formatCplusplus test/*.cpp formatCplusplus "test/*.cpp"
formatCplusplus test/cfg/*.c formatCplusplus "test/cfg/*.c"
formatCplusplus test/cfg/*.cpp formatCplusplus "test/cfg/*.cpp"
formatCplusplus test/*.h formatCplusplus "test/*.h"
formatCplusplus tools/*.cpp formatCplusplus "tools/*.cpp"
formatCplusplusRecursive "tools/*.h" formatCplusplusRecursive "tools/*.h"
formatCplusplusRecursive "samples/*.c" formatCplusplusRecursive "samples/*.c"
formatCplusplusRecursive "samples/*.cpp" formatCplusplusRecursive "samples/*.cpp"