vendethiel / GladiusEx

13 stars 19 forks source link

luacheck #9

Closed vendethiel closed 6 years ago

vendethiel commented 6 years ago

from Resike:

luacheck - --formatter=plain --std none --only [111,112,113] --no-unused --no-redefined --no-unused-args --no-unused-secondaries --no-self --no-max-line-length --no-max-code-line-length --no-max-string-line-length --no-max-comment-line-length --codes --ranges --filename @

111    Setting an undefined global variable.
112    Mutating an undefined global variable.
113    Accessing an undefined global variable.

https://luacheck.readthedocs.io/en/stable/warnings.html

slaren commented 6 years ago

I used to use findglobals, a very simple script to check for global accesses, and obviously this is much better. It is a good idea to use something like this to make sure that you didn't forget to declare some local variable, but unless it can be configured to ignore globals from the WoW API and from other addons most of these are going to be false positives.

vendethiel commented 6 years ago

I've seen findglobals. Seems good, but I'm probably going to write a small script to detect it without needing a lua runtime.