import luacheck 0.15.0

Luacheck is a static analyzer and a linter for Lua. Luacheck detects
various issues such as usage of undefined global variables, unused
variables and values, accessing uninitialized variables, unreachable
code and more. Most aspects of checking are configurable: there are
options for defining custom project-related globals, for selecting set
of standard globals (version of Lua standard library), for filtering
warnings by type and name of related variable, etc. The options can be
used on the command line, put into a config or directly into checked
files as Lua comments.

Luacheck supports checking Lua files using syntax of Lua 5.1, Lua 5.2,
Lua 5.3 and LuaJIT 2.0. Luacheck itself is written in Lua and runs on
all of mentioned Lua versions.
This commit is contained in:
jsg 2016-04-29 11:43:12 +00:00
parent fcd0185bd7
commit 350d29950b
4 changed files with 117 additions and 0 deletions

37
devel/luacheck/Makefile Normal file
View File

@ -0,0 +1,37 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/04/29 11:43:12 jsg Exp $
COMMENT= tool for linting and static analysis of Lua code
CATEGORIES= devel
V= 0.15.0
DISTNAME= luacheck-${V}
GH_ACCOUNT= mpeterv
GH_PROJECT= luacheck
GH_TAGNAME= ${V}
MAINTAINER= Jonathan Gray <jsg@openbsd.org>
BUILD_DEPENDS= textproc/py-sphinx
# MIT
PERMIT_PACKAGE_CDROM= Yes
NO_TEST= Yes
MODULES= lang/lua
pre-configure:
sed -i 's,/usr/bin/env lua,${MODLUA_BIN},g' ${WRKSRC}/bin/luacheck.lua
do-build:
${LOCALBASE}/bin/sphinx-build -N ${WRKSRC}/docsrc ${WRKSRC}/doc
do-install:
${INSTALL_DATA_DIR} ${MODLUA_DATADIR}/luacheck
${INSTALL_DATA} ${WRKSRC}/src/luacheck/*.lua ${MODLUA_DATADIR}/luacheck
${INSTALL_SCRIPT} ${WRKSRC}/bin/luacheck.lua ${PREFIX}/bin/luacheck
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luacheck
cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/luacheck
.include <bsd.port.mk>

2
devel/luacheck/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (luacheck-0.15.0.tar.gz) = EauUXc0BbdF9LRS+r0WtUuzbbXGJ0S5S4eWVam12zog=
SIZE (luacheck-0.15.0.tar.gz) = 104381

13
devel/luacheck/pkg/DESCR Normal file
View File

@ -0,0 +1,13 @@
Luacheck is a static analyzer and a linter for Lua. Luacheck detects
various issues such as usage of undefined global variables, unused
variables and values, accessing uninitialized variables, unreachable
code and more. Most aspects of checking are configurable: there are
options for defining custom project-related globals, for selecting set
of standard globals (version of Lua standard library), for filtering
warnings by type and name of related variable, etc. The options can be
used on the command line, put into a config or directly into checked
files as Lua comments.
Luacheck supports checking Lua files using syntax of Lua 5.1, Lua 5.2,
Lua 5.3 and LuaJIT 2.0. Luacheck itself is written in Lua and runs on
all of mentioned Lua versions.

65
devel/luacheck/pkg/PLIST Normal file
View File

@ -0,0 +1,65 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/04/29 11:43:12 jsg Exp $
bin/luacheck
share/doc/luacheck/
share/doc/luacheck/_sources/
share/doc/luacheck/_sources/cli.txt
share/doc/luacheck/_sources/config.txt
share/doc/luacheck/_sources/index.txt
share/doc/luacheck/_sources/inline.txt
share/doc/luacheck/_sources/module.txt
share/doc/luacheck/_sources/warnings.txt
share/doc/luacheck/_static/
share/doc/luacheck/_static/ajax-loader.gif
share/doc/luacheck/_static/basic.css
share/doc/luacheck/_static/comment-bright.png
share/doc/luacheck/_static/comment-close.png
share/doc/luacheck/_static/comment.png
share/doc/luacheck/_static/default.css
share/doc/luacheck/_static/doctools.js
share/doc/luacheck/_static/down-pressed.png
share/doc/luacheck/_static/down.png
share/doc/luacheck/_static/file.png
share/doc/luacheck/_static/jquery.js
share/doc/luacheck/_static/minus.png
share/doc/luacheck/_static/plus.png
share/doc/luacheck/_static/pygments.css
share/doc/luacheck/_static/searchtools.js
share/doc/luacheck/_static/sidebar.js
share/doc/luacheck/_static/underscore.js
share/doc/luacheck/_static/up-pressed.png
share/doc/luacheck/_static/up.png
share/doc/luacheck/_static/websupport.js
share/doc/luacheck/cli.html
share/doc/luacheck/config.html
share/doc/luacheck/genindex.html
share/doc/luacheck/index.html
share/doc/luacheck/inline.html
share/doc/luacheck/module.html
share/doc/luacheck/objects.inv
share/doc/luacheck/search.html
share/doc/luacheck/searchindex.js
share/doc/luacheck/warnings.html
share/lua/${MODLUA_VERSION}/luacheck/
share/lua/${MODLUA_VERSION}/luacheck/analyze.lua
share/lua/${MODLUA_VERSION}/luacheck/argparse.lua
share/lua/${MODLUA_VERSION}/luacheck/cache.lua
share/lua/${MODLUA_VERSION}/luacheck/check.lua
share/lua/${MODLUA_VERSION}/luacheck/config.lua
share/lua/${MODLUA_VERSION}/luacheck/core_utils.lua
share/lua/${MODLUA_VERSION}/luacheck/expand_rockspec.lua
share/lua/${MODLUA_VERSION}/luacheck/filter.lua
share/lua/${MODLUA_VERSION}/luacheck/format.lua
share/lua/${MODLUA_VERSION}/luacheck/fs.lua
share/lua/${MODLUA_VERSION}/luacheck/globbing.lua
share/lua/${MODLUA_VERSION}/luacheck/init.lua
share/lua/${MODLUA_VERSION}/luacheck/inline_options.lua
share/lua/${MODLUA_VERSION}/luacheck/lexer.lua
share/lua/${MODLUA_VERSION}/luacheck/linearize.lua
share/lua/${MODLUA_VERSION}/luacheck/main.lua
share/lua/${MODLUA_VERSION}/luacheck/multithreading.lua
share/lua/${MODLUA_VERSION}/luacheck/options.lua
share/lua/${MODLUA_VERSION}/luacheck/parser.lua
share/lua/${MODLUA_VERSION}/luacheck/reachability.lua
share/lua/${MODLUA_VERSION}/luacheck/stds.lua
share/lua/${MODLUA_VERSION}/luacheck/utils.lua
share/lua/${MODLUA_VERSION}/luacheck/version.lua