2018-02-22 05:28:52 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-02-22 16:29:57 +01:00
|
|
|
# Run linter on the lua scripts in stand/lua. luacheck, available in ports as
|
|
|
|
# devel/lua-luacheck, must be installed as a dependency of this script.
|
2018-02-22 05:28:52 +01:00
|
|
|
|
|
|
|
die() {
|
|
|
|
echo $*
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
LUACHECK=$(which luacheck)
|
|
|
|
|
|
|
|
[ ! -z "${LUACHECK}" ] && [ -e "${LUACHECK}" ] || \
|
|
|
|
die "You must have luacheck installed and in your PATH"
|
|
|
|
|
|
|
|
cd $(make -V SRCTOP)/stand
|
|
|
|
${LUACHECK} . --globals loader --globals lfs --globals io.getchar \
|
2018-03-07 19:41:16 +01:00
|
|
|
--globals io.ischar --globals printc --globals cli_execute \
|
2020-12-17 19:29:30 +01:00
|
|
|
--globals cli_execute_unparsed --globals try_include \
|
2024-08-13 03:54:27 +02:00
|
|
|
--globals pager --globals gfx --globals hash --std lua53
|