I was recently introduced to a tool called “code style” in my java class that analyzes the style of your code based on a standard and tells you how to fix any inconsistencies. For example, if you don’t put spaces before and after an operator, it will tell you to add spaces.
My question is whether there exists a check style tool for Lua? I can’t find one with a quick search.
This is definitely related to scripting, and definitely fits into “everything” - code review is for reviewing specific parts of code, and shouldn’t be pointed to the instant someone says anything about formatting.
In the software dev world, this is known as a “linter.” It helps enforce style and best practices. Just about every popular language has a linter available.
For Lua, the best we have (that I know of) is Luacheck. You will have to install LuaRocks first to get it. LuaRocks is a package manager for Lua.
Then you can use VS Code and Rojo as @Zooleos said.
Here’s a screenshot example, where Luacheck has informed me that my “hello” variable is not used anywhere else in my code: