[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [OFF] 5 years to find a typo in a config script
- From: Sean Conner <sean@...>
- Date: Sun, 2 Sep 2018 16:48:02 -0400
It was thus said that the Great Egor Skriptunoff once stated:
>
> The conclusions from this story:
> 1) Typos are hard-to-find bugs.
> 2) IMO, Lua have to somehow solve the problem of absence of warnings about
> misspelled identifiers.
I use luacheck for that.
More specifically, Lua would have to be changed to require all variables
decleared before use. Even luacheck requires this with special comments.
For example, luacheck does: "Hmm ... this is the first instance of 'baa'
I've seen. It has not been declared as a local, nor is it a standard
global, nor has it been defined as a global to me. Therefore, it must be a
misspelled identifier [1]."
-spc
[1] Calling Gregg Reynolds! Calling Gregg Reynolds! [2]
[2] Email thread starting here:
http://lua-users.org/lists/lua-l/2018-07/msg00094.html