From 0ee778cac1eeeddf53ae6f60de85d87979629801 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 4 Jul 2023 03:43:54 +0100 Subject: [PATCH] Tools: Scripts: run_luacheck: allow passing extra arguments --- Tools/scripts/run_luacheck.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tools/scripts/run_luacheck.sh b/Tools/scripts/run_luacheck.sh index bed71fb88e..43e0af5d0e 100755 --- a/Tools/scripts/run_luacheck.sh +++ b/Tools/scripts/run_luacheck.sh @@ -1,7 +1,15 @@ #!/bin/bash # Run lua check for all lua files passing AP specific config +# Can also pass any number of arguments that are passed onto luacheck +# for example the path of a single script could be given cd "$(dirname "$0")" cd ../.. -luacheck */ --config libraries/AP_Scripting/tests/luacheck.lua +CHECK_PATH="$*" +if test -z "$CHECK_PATH" +then + CHECK_PATH="*/" +fi + +luacheck ${CHECK_PATH} --config libraries/AP_Scripting/tests/luacheck.lua