Skip to content

Commit

Permalink
Tools: Scripts: run_luacheck: allow passing extra arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Jul 5, 2023
1 parent e26f8c1 commit 0ee778c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Tools/scripts/run_luacheck.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0ee778c

Please sign in to comment.