Enable travis

This commit is contained in:
Louis 2020-02-21 01:12:19 +01:00
parent 376e596f17
commit 0d84703fa8
3 changed files with 52 additions and 0 deletions

30
.luacheckrc Normal file

@ -0,0 +1,30 @@
std = "lua51+minetest"
unused_args = false
allow_defined_top = true
max_line_length = 90
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"core",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
}
read_globals = {
"toolranks",
"farming",
}

8
.pre-commit-config.yaml Normal file

@ -0,0 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending

14
.travis.yml Normal file

@ -0,0 +1,14 @@
language: python
install:
- sudo apt-get update -qq
- sudo apt-get install -qqq luarocks
- pip3 install pre-commit
- luarocks install --local luacheck
script:
- pre-commit run --all-files
- $HOME/.luarocks/bin/luacheck .
notifications:
email: false