Tools used for development
#22
Found a nice tool for checking lua code and added it as a external tool in Decoda  Smile  

Name: luacheck
link: https://github.com/mpeterv/luacheck

As external tool in Decoda:
Title: Luacheck
Command: luacheck
Arguments: $(ItemDir) -g -a

-g ignore global variables, for example cPluginManger
-a ignore unused function arguments

With this 2 flags it creates a useful output.


Edit: Here a small output from Core
Warnings:
Core\banlist.lua:251:9: unused variable 'Reason'
Core\banlist.lua:253:9: unused variable 'Reason'

Code:
-- If the player supplied a reason, use that, else use a default reason.
if (a_Split[3] ~= nil) then
    local Reason = table.concat(a_Split, " ", 3)
else
    local Reason = "No reason."
end

-- Add the player to the banlist:
AddPlayerToBanlist(a_Split[2], Reason, a_Player:GetName());

As you see the variable Reason is defined inside of a if block and Reason is nil hereBig Grin
Reply
Thanks given by:


Messages In This Thread
Tools used for development - by xoft - 02-11-2013, 01:32 AM
RE: Tools used for development - by Taugeshtu - 02-11-2013, 02:19 AM
RE: Tools used for development - by NiLSPACE - 02-11-2013, 02:22 AM
RE: Tools used for development - by FakeTruth - 02-11-2013, 04:17 AM
RE: Tools used for development - by xoft - 02-12-2013, 05:23 AM
RE: Tools used for development - by NiLSPACE - 02-12-2013, 05:29 AM
RE: Tools used for development - by Taugeshtu - 02-12-2013, 06:12 AM
RE: Tools used for development - by FakeTruth - 02-12-2013, 06:14 AM
RE: Tools used for development - by xoft - 01-11-2014, 02:22 AM
RE: Tools used for development - by bearbin - 01-11-2014, 05:09 AM
RE: Tools used for development - by tigerw - 01-11-2014, 06:16 AM
RE: Tools used for development - by tonibm19 - 01-11-2014, 07:10 AM
RE: Tools used for development - by NiLSPACE - 01-11-2014, 07:17 AM
RE: Tools used for development - by xoft - 01-11-2014, 07:27 AM
RE: Tools used for development - by tigerw - 01-11-2014, 09:11 AM
RE: Tools used for development - by FakeTruth - 01-11-2014, 02:24 PM
RE: Tools used for development - by Seadragon91 - 07-02-2014, 02:50 AM
RE: Tools used for development - by worktycho - 07-02-2014, 03:28 AM
RE: Tools used for development - by xoft - 08-27-2014, 06:57 PM
RE: Tools used for development - by sphinxc0re - 08-28-2014, 07:23 AM
RE: Tools used for development - by NiLSPACE - 06-26-2015, 11:31 PM
RE: Tools used for development - by Seadragon91 - 09-11-2016, 05:18 PM
RE: Tools used for development - by xoft - 09-12-2016, 01:54 AM
RE: Tools used for development - by Seadragon91 - 09-12-2016, 04:20 AM
RE: Tools used for development - by xoft - 09-12-2016, 04:52 AM



Users browsing this thread: 4 Guest(s)