From 3fa2b680a460f3d11b155d91cfa215125eb69f72 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Fri, 7 Feb 2020 14:12:11 -0600 Subject: [PATCH] Use Luarocks to install luacheck Also remove worthless variable. --- .github/workflows/check-release.yml | 14 +++++++++----- .luacheckrc | 6 +----- worldedit_gui/init.lua | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 4432ad1..9411751 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -1,11 +1,15 @@ on: [push, pull_request] name: Check & Release + jobs: lint: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@master - - name: lint - uses: Roang-zero1/factorio-mod-luacheck@master - with: - luacheckrc_url: https://raw.githubusercontent.com/Uberi/Minetest-WorldEdit/master/.luacheckrc + - uses: actions/checkout@v1 + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/.luacheckrc b/.luacheckrc index 7c09775..7233ead 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -12,10 +12,6 @@ ignore = { "file", "name", } -globals = { - "minetest" -} - read_globals = { string = {fields = {"split", "trim"}}, table = {fields = {"copy", "getn"}}, @@ -24,5 +20,5 @@ read_globals = { "smart_inventory", "sfinv", "VoxelArea", "inventory_plus", - "ItemStack", + "ItemStack", "minetest", } diff --git a/worldedit_gui/init.lua b/worldedit_gui/init.lua index 20eb83b..3e8b9e1 100644 --- a/worldedit_gui/init.lua +++ b/worldedit_gui/init.lua @@ -88,7 +88,6 @@ if minetest.global_exists("unified_inventory") then -- unified inventory install worldedit.show_page(name, "worldedit_gui") return true elseif fields.worldedit_gui_exit then --return to original page - player = minetest.get_player_by_name(name) if player then unified_inventory.set_inventory_formspec(player, "craft") end