Lint-ing tool for Lua [closed]

余生颓废 提交于 2019-12-03 06:04:56

Lua-Checker will get the job done for you. Another tool is Lua Lint

There is also lua-inspect. I integrated it into ZeroBrane Studio IDE and extended the list of potential problems it reports. Here is the subset of what gets reported from one of my tests:

  • inspect.lua(1): first assignment to global variable 'f'
  • inspect.lua(2): first use of unknown global variable 'b'
  • inspect.lua(4): unused parameter 'to' in anonymous function
  • inspect.lua(8): unused local variable 'y'; consider removing or replacing with '_'
  • inspect.lua(11): local variable 'y' masks earlier declaration on line 10
  • inspect.lua(15): local function 'y' masks earlier declaration on line 8
  • inspect.lua(17): unused local function 'test'
  • inspect.lua(17): unused parameter 'x' in function 'test'
  • inspect.lua(30): unused parameter 'bar' in function 'tbl.foo'
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!