Peter Melnichenko

Results 117 comments of Peter Melnichenko

This would be convenient, but it's not easy to detect all setfenv calls (e.g. they may be wrapped in some auxiliary function like the old `module()`), and more importantly, the...

Luacheck doesn't execute the checked code in any way (not even in abstract interpretation sense) so it can't evaluate anything like that.

I'll try to implement a very simple variant of this in one or two versions. Basically, for each value assigned to a local variable that can be accessed only through...

@Zamiell I plan to add simple unused and undefined table field detection in the next version, I hope to release it by the end of the next week.

@Zamiell no, I don't think that's necessary

This will take a bit more time as I decided to implement flow-based detection, so that at least usage before definition is detected. However, this detection still works only in...

Not yet, I'm sorry, I've had to postpone this. Mainly because quite a lot of effort for something that detected undefined fields only in some limited cases.

I agree that it's more rare to forget `local` before a function definition than before a normal assignment, just because of the syntax. However, I think that reasons for setting...

Currently Lua interface does not read luacheck config. See #107. As a workaround, if you want to use config from Lua, you'd have to execute luacheck command line with io.popen...

Ah, I remember where I saw your username now :smile: Yes, I agree that it should be possible to add custom sets of globals without using config. As a hack...