Comments (2)
鉴于以下情况,我们默认忽略了文件中的全局变量:
在工程中有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等。
from luapanda.
可以做一个共享全局变量的检查吗,就是无论A、B 只要存在不存在的全局变量引用,就报错
from luapanda.
Related Issues (20)
- 调试器没有找到文件 chunk.lua.txt HOT 2
- win 下使用attach 模式时,debugger 关闭后再次开启,无法再次连接到 lua 程序 HOT 1
- 一堆代码下面有警告下划线 关不掉 HOT 2
- LuaJIT的hook没有tail call HOT 2
- 断点以后,显示变量的值不对,所有的变量值都是一样的,这应该是一个BUG HOT 1
- 调试器没有找到文件 lua.lua 。 请检查launch.json文件中lua后缀是否配置正确, 以及VSCode打开的工程是否正确 HOT 4
- 协程coroutine.wrap()创建,断点断不住 HOT 4
- Windows下配置luanch.json启动参数program时, 路径带有空格则启动失败. HOT 1
- Socket 无法通信导致ReGetSockFail HOT 1
- libpdebug.lua找不到是什么原因 HOT 1
- UE5蓝图使用Luajit,在Load的时候会直接崩溃,你们有碰到类似的问题吗? HOT 1
- 关于 lua 5.3/5.4 无法建立连接的问题 HOT 1
- 打开包含大量文件的目录,插件会coredump HOT 3
- 关于Arm架构 lipDebug支持的问题 HOT 1
- 关于在5.4下使用luapanda
- 反转C-S后,内网环境下,远程调试连接不上 HOT 1
- Lua Debug 插件和 LuaPanda 插件 attach 模式会互相冲突,导致无法断点,或者断点失效问题 HOT 1
- 更新到vscode 1.82后,插件报错无法运行 HOT 5
- 使用了distinguishSameNameFile=true,truncatedOPath过滤公共串后,同名文件正则识别错误(没有处理"["、"]") HOT 2
- 没有 用于IntlliSense的cpp 菜单 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luapanda.