-
Does it make sense to run |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@fperrad That's a good question, because I've seen people doing it and asking for compiler changes to appease luacheck's output. Personally, I don't think so, because the things I mainly use luacheck for are things that Teal can check (unused variables that hint at a typo, etc.) However, if we look at the classes of checks that luacheck does, some of them are the kinds of checks that a statically-typed-language compiler naturally does (roughly 1xx, 2xx, 3xx, 4xx), some are warnings that the compiler could do but currently doesn't (some of 5xx), and some are typical linter stuff that's usually not seen in a compiler (6xx). If there are warnings from luacheck that you're missing in Teal (that are not of the linter kind), I'd like to hear about them, and I'm open for supporting more warnings and especially happy to take contributions in that area (I wasn't even the original author of the support for warnings, which started with "unused variable" — @euclidianAce did it!) That said, I don't take as a Teal goal to always produce output Lua that passes luacheck. Even though the output currently looks pretty good and is pretty tame, machine-generated code needs to allow itself to be ugly and I'd never choose adding extra complexity to the code generator just to appease a checker tool if I know the code I'm generating works. So I don't recommend people to add a luacheck CI step after generating Lua from Teal. (But we do have |
Beta Was this translation helpful? Give feedback.
@fperrad That's a good question, because I've seen people doing it and asking for compiler changes to appease luacheck's output.
Personally, I don't think so, because the things I mainly use luacheck for are things that Teal can check (unused variables that hint at a typo, etc.)
However, if we look at the classes of checks that luacheck does, some of them are the kinds of checks that a statically-typed-language compiler naturally does (roughly 1xx, 2xx, 3xx, 4xx), some are warnings that the compiler could do but currently doesn't (some of 5xx), and some are typical linter stuff that's usually not seen in a compiler (6xx).
If there are warnings from luacheck that you're missing in Teal (th…