mirror of
https://github.com/MinetestForFun/mysql_base.git
synced 2024-11-17 15:48:22 +01:00
Add Travis CI and LuaCheck (#2)
This commit is contained in:
parent
1a36d6a7d5
commit
00a0c881a2
19
.luacheckrc
Normal file
19
.luacheckrc
Normal file
@ -0,0 +1,19 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
|
||||
globals ={
|
||||
"minetest",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split", "trim"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
}
|
||||
|
||||
files["init.lua"].ignore = { "modname", "tab" }
|
||||
files["mysql/mysql.lua"].ignore = { "" }
|
||||
files["mysql/mysql_h.lua"].ignore = { "" }
|
||||
files["mysql/mysql_print.lua"].ignore = { "" }
|
||||
files["mysql/mysql_test.lua"].ignore = { "" }
|
||||
-- ^ Ignore everything
|
11
.travis.yml
Normal file
11
.travis.yml
Normal file
@ -0,0 +1,11 @@
|
||||
language: generic
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- luarocks
|
||||
before_install:
|
||||
- luarocks install --local luacheck
|
||||
script:
|
||||
- $HOME/.luarocks/bin/luacheck .
|
||||
notifications:
|
||||
email: false
|
@ -1,4 +1,5 @@
|
||||
# mysql_base
|
||||
[![Build Status](https://travis-ci.org/MinetestForFun/mysql_base.svg)](https://travis-ci.org/MinetestForFun/mysql_base)
|
||||
|
||||
Base Minetest mod to connect to a MySQL database. Used by other mods to read/write data.
|
||||
|
||||
|
4
init.lua
4
init.lua
@ -1,5 +1,5 @@
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
|
||||
local thismod = {
|
||||
enabled = false,
|
||||
@ -69,7 +69,7 @@ local function string_splitdots(s)
|
||||
local word_bound = i - 1
|
||||
table.insert(temp, string.sub(s, index, word_bound))
|
||||
index = next_index
|
||||
else
|
||||
else
|
||||
if index > 0 and index <= last_index then
|
||||
table.insert(temp, string.sub(s, index, last_index))
|
||||
elseif index == 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user