freebsd-dev/tools/boot/lua-lint.sh
Kyle Evans 5af17cb319 lua-lint: Add note about luacheck in ports, silence warning
luacheck was added in ports r462609.

Silence warning about cli_execute -- it's non-standard, but for our setup it
will be a standard global.
2018-02-22 15:29:57 +00:00

20 lines
496 B
Bash
Executable File

#!/bin/sh
# $FreeBSD$
# 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.
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 \
--globals io.ischar --globals cli_execute --std lua53