summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-07-04 18:04:32 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-07-05 19:21:06 +0200
commit1ce1c73249cf5620726f9b00fd58cac1747b1e70 (patch)
tree0167a465c36734164a8155d253d9f39a9a5e7bf0
parent07cd0b4d8c712303e404e1becbb8d189e7bd2384 (diff)
Add Travis CI with luacheck
-rw-r--r--.gitignore1
-rw-r--r--.luacheckrc16
-rw-r--r--.travis.yml11
3 files changed, 28 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 926ccaaf..7ac6d5b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
doc/tags
+.luacheckcache
diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644
index 00000000..cb61432f
--- /dev/null
+++ b/.luacheckrc
@@ -0,0 +1,16 @@
+-- Rerun tests only if their modification time changed.
+cache = true
+
+-- Glorious list of warnings: https://luacheck.readthedocs.io/en/stable/warnings.html
+ignore = {
+ "212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off.
+ "411", -- Redefining a local variable.
+ "412", -- Redefining an argument.
+ "422", -- Shadowing an argument
+ "122" -- Indirectly setting a readonly global
+}
+
+-- Global objects defined by the C code
+read_globals = {
+ "vim",
+}
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..a6749df1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,11 @@
+
+language: c
+dist: bionic
+before_install:
+ - sudo apt-get update
+ - sudo add-apt-repository universe
+ - sudo apt install luarocks -y
+ - sudo luarocks install luacheck
+
+script:
+ - luacheck **/**/*.lua --codes