summaryrefslogtreecommitdiffstats
path: root/lua-forge
diff options
context:
space:
mode:
authorVlad Glagolev2018-05-25 11:25:03 -0400
committerVlad Glagolev2018-05-25 11:25:46 -0400
commitb66718c4d72b16b7c8481a04a3c3f2484dcc231d (patch)
tree871edcf46db7b5c9ba389a8c4326012221756aa4 /lua-forge
parentcab9ab48912123f12abab00dbb0f7cd75820066c (diff)
luacheck: new spell, tool for linting and static analysis of Lua code
Diffstat (limited to 'lua-forge')
-rwxr-xr-xlua-forge/luacheck/BUILD1
-rwxr-xr-xlua-forge/luacheck/DEPENDS2
-rwxr-xr-xlua-forge/luacheck/DETAILS21
-rw-r--r--lua-forge/luacheck/HISTORY2
-rwxr-xr-xlua-forge/luacheck/INSTALL9
5 files changed, 35 insertions, 0 deletions
diff --git a/lua-forge/luacheck/BUILD b/lua-forge/luacheck/BUILD
new file mode 100755
index 0000000000..27ba77ddaf
--- /dev/null
+++ b/lua-forge/luacheck/BUILD
@@ -0,0 +1 @@
+true
diff --git a/lua-forge/luacheck/DEPENDS b/lua-forge/luacheck/DEPENDS
new file mode 100755
index 0000000000..696fa4b332
--- /dev/null
+++ b/lua-forge/luacheck/DEPENDS
@@ -0,0 +1,2 @@
+depends LUA &&
+depends luafilesystem
diff --git a/lua-forge/luacheck/DETAILS b/lua-forge/luacheck/DETAILS
new file mode 100755
index 0000000000..7830ba19f1
--- /dev/null
+++ b/lua-forge/luacheck/DETAILS
@@ -0,0 +1,21 @@
+ SPELL=luacheck
+ VERSION=0.22.0
+ SOURCE=${SPELL}-${VERSION}.tar.gz
+ SOURCE_URL[0]=https://github.com/mpeterv/${SPELL}/archive/${VERSION}.tar.gz
+ SOURCE_HASH=sha512:8264000711214e8451307e7f51a45b06d2fcd5da0d3cb49952d54b07a9448431ae3fd68a8cd0a27c73c3b03e6de74e8ae786c139707e16cf938921ab582d3bfd
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ WEB_SITE=https://github.com/mpeterv/luacheck
+ LICENSE[0]=MIT
+ ENTERED=20180525
+ SHORT="tool for linting and static analysis of Lua code"
+cat << EOF
+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.
+EOF
diff --git a/lua-forge/luacheck/HISTORY b/lua-forge/luacheck/HISTORY
new file mode 100644
index 0000000000..62e6c0da57
--- /dev/null
+++ b/lua-forge/luacheck/HISTORY
@@ -0,0 +1,2 @@
+2018-05-25 Vlad Glagolev <stealth@sourcemage.org>
+ * DEPENDS, DETAILS, BUILD, INSTALL: created spell, version 0.22.0
diff --git a/lua-forge/luacheck/INSTALL b/lua-forge/luacheck/INSTALL
new file mode 100755
index 0000000000..c5aae86391
--- /dev/null
+++ b/lua-forge/luacheck/INSTALL
@@ -0,0 +1,9 @@
+local LUA=$(installed_version lua) &&
+local LCDIR="/usr/share/lua/${LUA%.?}/luacheck" &&
+
+./install.lua "${INSTALL_ROOT}${LCDIR}" &&
+
+for binary in luacheck.lua luacheck; do
+ ln -vsf "${TRACK_ROOT}${LCDIR}/bin/${binary}" \
+ "${INSTALL_ROOT}/usr/bin/${binary}"
+done