Page 1 of 1

Can I run Luacheck on Github without a pull request?

PostPosted: Sat Mar 04, 2017 08:42
by burli
Can I run Luacheck on Github without a pull request? If not, is there a Linux tool that I can use?

Re: Can I run Luacheck on Github without a pull request?

PostPosted: Sat Mar 04, 2017 09:09
by kaeza
Uh... use LuaCheck?

For Debian/Ubuntu:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt install luarocks
sudo luarocks install luacheck

Re: Can I run Luacheck on Github without a pull request?

PostPosted: Sat Mar 04, 2017 10:18
by burli
kaeza wrote:Uh... use LuaCheck?

For Debian/Ubuntu:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt install luarocks
sudo luarocks install luacheck


Thanks, but I get tons of Warnings.

For example
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Checking mods/wool/init.lua                       5 warnings

    mods/wool/init.lua:26:2: accessing undefined variable minetest
    mods/wool/init.lua:32:12: accessing undefined variable default
    mods/wool/init.lua:35:2: accessing undefined variable minetest
    mods/wool/init.lua:46:1: accessing undefined variable minetest
    mods/wool/init.lua:47:1: accessing undefined variable minetest


I assume that I need to set them in the configuration file somehow. Do you have an example?

Edit: I think/hope I got it

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
globals = {"minetest", "default", "vector"}


Anything else I need?

Re: Can I run Luacheck on Github without a pull request?

PostPosted: Thu Mar 09, 2017 20:29
by kaeza
Check the LuaCheck config file used by minetest_game.
See also the LuaCheck documentation.

Re: Can I run Luacheck on Github without a pull request?

PostPosted: Thu Mar 09, 2017 20:31
by burli
kaeza wrote:Check the LuaCheck config file used by minetest_game.
See also the LuaCheck documentation.

Found this yesterday. This is relatively new in the repo

Re: Can I run Luacheck on Github without a pull request?

PostPosted: Thu Mar 09, 2017 20:41
by rubenwardy
burli wrote:Found this yesterday. This is relatively new in the repo


since we've had luacheck as a travis job