aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2021-03-20 12:31:21 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2021-03-20 12:31:21 +0100
commit92cff24d4a19f2d37eb8e2525b23b92d78b1eee0 (patch)
tree6a4fa7c500d18a28bdef1ba2e5d9bd95125cf4fe /Makefile
parent127b82059475fbd357de5ee11030669e8e0fbc65 (diff)
downloadvis-spellcheck-92cff24d4a19f2d37eb8e2525b23b92d78b1eee0.tar.gz
add Makefile and lua-format style definition
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c43eeda
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+.PHONY: check format check-luacheck check-format
+
+LUA_FILES = $(wildcard *.lua)
+
+# bash's process substitution is used for check-format
+SHELL := /bin/bash
+
+check: check-luacheck check-format
+
+check-luacheck:
+ luacheck --globals=vis -- $(LUA_FILES)
+
+check-format:
+ for f in $(LUA_FILES); do diff $$f <(lua-format $$f) >/dev/null; done
+
+format:
+ lua-format -i $(LUA_FILES)