[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Stackoverflow 2018 survey
- From: Paul K <paul@...>
- Date: Wed, 14 Mar 2018 20:09:35 -0700
On Wed, Mar 14, 2018 at 7:57 PM, Daurnimator <quae@daurnimator.com> wrote:
> On 15 March 2018 at 13:51, ThePhD <jm3689@columbia.edu> wrote:
>> - Things explode at runtime, which a quick compiler check or linter check
>> could have saved me on. (Not just parsing my code. 'Did you mean to type
>> polx instead of polex?' Would have saved me 2 hours of tired, baggy-eyed
>> print()-ing)
>> -- Subset of above, many libraries handle `nil` because there's no
>> distinction in the language of `nil` versus `none`, making `nil` parameters
>> from that mistyped global get defaulted to some default value that just
>> manifests itself in specific runtime conditions and I guess it's time to do
>> some more debugging and vigorous checking and aaaaaah.
>
> Why don't you use a linter?
> luacheck is great at catching the simpler sort of things.
> https://github.com/mpeterv/luacheck
It's also integrated into ZeroBrane Studio, so you just need to
configure it to be used instead of the default linter [1]. You can
also install AnalyzeAll plugin that will check all lua files in your
project [2].
Paul.
[1] https://studio.zerobrane.com/doc-general-preferences#static-analyzer
[2] https://github.com/pkulchenko/ZeroBranePackage/blob/master/analyzeall.lua