lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Mar 4, 2017 at 7:26 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> What is the main reason for using Luacheck?
>
> (a) A debugging tool.
> (b) Enforcing a certain style of coding.
> (c) Advising a programmer on things in his program that
> might make trouble one day.
>
> Unless you use it for (b), I would not be concerned about the
> occasional extra warning in situations where any human can
> see it is OK. Turing has already taught us that we can't use
> a program to test correctness of a program. Why clutter
> Luacheck with exceptional cases?
>

It's mostly c) but it is sometimes difficult to distinguish these cases.
E.g. in my opinion shadowing a local with a new one with the same name
can be a source of bugs, but I've seen people consider warnings
about this annoying and stylistic. I try to make the warnings
clear-cut and provide options to ignore some of them according
to alternative preferences. It seems like overkill in this
particular case though.

-- Peter