From 274aa963ddd3e29cd847aea8b7934351c56ed682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 3 Mar 2017 23:00:33 +0100 Subject: build: add luacheck make target --- .luacheckrc | 5 +++++ Makefile | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .luacheckrc 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 -- cgit v1.2.3