5c3354db03
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.
20 lines
496 B
Bash
Executable File
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
|