2018-02-22 04:28:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2018-02-22 15:29:57 +00: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 04:28:52 +00: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 18:41:16 +00:00
|
|
|
--globals io.ischar --globals printc --globals cli_execute \
|
2020-12-17 18:29:30 +00:00
|
|
|
--globals cli_execute_unparsed --globals try_include \
|
|
|
|
--globals pager --std lua53
|