aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-03 23:00:33 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-03 23:04:27 +0100
commit274aa963ddd3e29cd847aea8b7934351c56ed682 (patch)
tree53a48f73d3c3b58a6f624e5a3fb3f9d171c5a3a1
parent7f4fa4bf95b481eb09432f74a27d5f4a478142cf (diff)
downloadvis-274aa963ddd3e29cd847aea8b7934351c56ed682.tar.gz
vis-274aa963ddd3e29cd847aea8b7934351c56ed682.tar.xz
build: add luacheck make target
-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