diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..7a8b68e --- /dev/null +++ b/.luacheckrc @@ -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", +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4c6d6f1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..980bbbd --- /dev/null +++ b/.travis.yml @@ -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