luacheck icon indicating copy to clipboard operation
luacheck copied to clipboard

Possibility to check by known functions signatures

Open johnd0e opened this issue 6 years ago • 2 comments

And besides of checking predefined std functions it would be even greater if we could specify own functions signatures inline.

johnd0e avatar Sep 13 '17 18:09 johnd0e

Do you mean checking types of passed arguments? I would like to avoid having to slowly add parts of type inference to existing luacheck codebase. If there will be type inference it will be implemented in a standalone library. I looked at some type systems for Lua and all seem to be focused on soundness, which is fine but IMO for a linter immediate lack of false positives, without any annotations, is very important. So this has to wait until someone makes a type inference library like that, maybe even me :smile:

If you mean something simpler like checking that number of passed arguments is not higher than expected then it could be added.

mpeterv avatar Sep 13 '17 20:09 mpeterv

Well, I mean rather first. But second is good too)

johnd0e avatar Sep 13 '17 21:09 johnd0e