From 0d84703fa8413e76832817366a66c3ad4cdbde36 Mon Sep 17 00:00:00 2001 From: Louis <55180044+louisroyer@users.noreply.github.com> Date: Fri, 21 Feb 2020 01:12:19 +0100 Subject: [PATCH] Enable travis --- .luacheckrc | 30 ++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 8 ++++++++ .travis.yml | 14 ++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 .luacheckrc create mode 100644 .pre-commit-config.yaml create mode 100644 .travis.yml 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