Let Travis-CI automatically run luacheck on the game
authorTim <t4im@users.noreply.github.com>
Sun, 26 Jun 2016 15:12:40 +0000 (17:12 +0200)
committerparamat <mat.gregory@virginmedia.com>
Tue, 9 Aug 2016 02:47:11 +0000 (03:47 +0100)
.luacheckrc [new file with mode: 0644]
.travis.yml [new file with mode: 0644]

diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644 (file)
index 0000000..f087d30
--- /dev/null
@@ -0,0 +1,17 @@
+unused_args = false
+allow_defined_top = true
+
+read_globals = {
+       "DIR_DELIM",
+       "minetest", "core",
+       "dump",
+       "vector", "nodeupdate",
+       "VoxelManip", "VoxelArea",
+       "PseudoRandom", "ItemStack",
+}
+
+-- Overwrites minetest.handle_node_drops
+files["mods/creative/init.lua"].globals = { "minetest" }
+
+-- Don't report on legacy definitions of globals.
+files["mods/default/legacy.lua"].global = false
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..805fe08
--- /dev/null
@@ -0,0 +1,14 @@
+language: generic
+
+branches:
+  only:
+    - master
+
+sudo: required
+
+before_install:
+  - sudo apt-get update
+  - sudo apt-get install -y luarocks
+  - sudo luarocks install luacheck
+
+script: luacheck --no-color ./mods