aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.luacheckrc5
-rw-r--r--Makefile5
2 files changed, 9 insertions, 1 deletions
diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644
index 0000000..350512b
--- /dev/null
+++ b/.luacheckrc
@@ -0,0 +1,5 @@
+-- std = "min"
+globals = { "vis" }
+include_files = { "lua/*.lua", "lua/**/*.lua", "test/lua/*.lua" }
+exclude_files = { "lua/lexer.lua", "lua/lexers/**", "test/lua/visrc.lua" }
+files["test/lua"] = { std = "+busted" }
diff --git a/Makefile b/Makefile
index b702955..f1a7d35 100644
--- a/Makefile
+++ b/Makefile
@@ -101,6 +101,9 @@ luadoc:
luadoc-all:
@cd lua/doc && ldoc -a . && sed -e "s/RELEASE/${VERSION}/" -i index.html
+luacheck:
+ @luacheck --config .luacheckrc lua test/lua | less -R
+
install: $(ELF)
@echo stripping executable
@for e in $(ELF); do \
@@ -137,4 +140,4 @@ uninstall:
@echo removing support files from ${DESTDIR}${SHAREPREFIX}/vis
@rm -rf ${DESTDIR}${SHAREPREFIX}/vis
-.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all man
+.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all luacheck man