We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在未配置.luacheckrc的情况下,LuaPanda 没有识别全局变量并提示,但在相同路径下直接调用 luacheck 能发现全局变量
The text was updated successfully, but these errors were encountered:
鉴于以下情况,我们默认忽略了文件中的全局变量: 在工程中有A、B两个lua文件,A中定义了一个全局变量,B require A,并在B中直接使用了A中定义的全局变量,这个时候对B运行luacheck,会认为B中使用了未定义的全局变量,报一个warning,accessing undefined variable XXX。考虑到全局变量可能定义在工程中的其他文件,也有可能是在运行时由lua框架(例如slua等)直接放入到lua虚拟机中,为了避免在这些情况下产生不必要的干扰,我们选择默认忽略了对全局变量的检查。
在VSCode的设置中还有一些关于Code Linting的配置,用以优化使用体验,例如Ignore Error Code、Luacheck Path等。
Sorry, something went wrong.
可以做一个共享全局变量的检查吗,就是无论A、B 只要存在不存在的全局变量引用,就报错
No branches or pull requests
在未配置.luacheckrc的情况下,LuaPanda 没有识别全局变量并提示,但在相同路径下直接调用 luacheck 能发现全局变量
The text was updated successfully, but these errors were encountered: