Another issue I ran into was the following function (from bump.lua):
Code: Select all
function World:hasItem(item)
return not not self.rects[item] -- unexpected symbol 'not'
end
Code: Select all
local val1, _
val1,_,val3,val4 = functionThatReturnsFourValues() -- undefined variable '_'
I think some hints for the sstrict via comments might be the way to go? Like how you might tell a linter to ignore the following line of code, or ignore specific warning that the linter would otherwise raise. That way you could still keep the warnings about empty code blocks, but nothing is done if user writes "-- sstrict-disable-next-code-block empty-block" or similar before it, aping eslint hints. Having a bunch of such hinting options wouldn't exactly make sstrict a very drop-in solution (well, it already is only for the bravest of souls in this form for existing projects), but it would alleviate some problems with it.
Lastly, I notice that sstrict doesn't have a license?