[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Luacheck 0.19.0
- From: Peter Melnichenko <mpeterval@...>
- Date: Sat, 4 Mar 2017 14:54:55 +0300
On Sat, Mar 4, 2017 at 7:26 AM, Dirk Laurie <email@example.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.