Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Commit 00a0c88

Browse files
authored
Add Travis CI and LuaCheck (#2)
1 parent 1a36d6a commit 00a0c88

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

.luacheckrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
unused_args = false
2+
allow_defined_top = true
3+
max_line_length = 999
4+
5+
globals ={
6+
"minetest",
7+
}
8+
9+
read_globals = {
10+
string = {fields = {"split", "trim"}},
11+
table = {fields = {"copy", "getn"}},
12+
}
13+
14+
files["init.lua"].ignore = { "modname", "tab" }
15+
files["mysql/mysql.lua"].ignore = { "" }
16+
files["mysql/mysql_h.lua"].ignore = { "" }
17+
files["mysql/mysql_print.lua"].ignore = { "" }
18+
files["mysql/mysql_test.lua"].ignore = { "" }
19+
-- ^ Ignore everything

.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: generic
2+
addons:
3+
apt:
4+
packages:
5+
- luarocks
6+
before_install:
7+
- luarocks install --local luacheck
8+
script:
9+
- $HOME/.luarocks/bin/luacheck .
10+
notifications:
11+
email: false

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# mysql_base
2+
[![Build Status](https://travis-ci.org/MinetestForFun/mysql_base.svg)](https://travis-ci.org/MinetestForFun/mysql_base)
23

34
Base Minetest mod to connect to a MySQL database. Used by other mods to read/write data.
45

init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
local modname = minetest.get_current_modname()
2-
local modpath = minetest.get_modpath(modname)
2+
local modpath = minetest.get_modpath(modname)
33

44
local thismod = {
55
enabled = false,
@@ -69,7 +69,7 @@ local function string_splitdots(s)
6969
local word_bound = i - 1
7070
table.insert(temp, string.sub(s, index, word_bound))
7171
index = next_index
72-
else
72+
else
7373
if index > 0 and index <= last_index then
7474
table.insert(temp, string.sub(s, index, last_index))
7575
elseif index == 0 then

0 commit comments

Comments
 (0)