添加检查"未定义的 field"Diagnostic undefined field #296
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.

在实际项目中,希望能尽量检查到拼写错误这种情况。Lua 不像静态语言那样能通过编译发现这种错误,而出现这种拼写错误带来的结果一般都不好。
lua-language-server 对下面前 3 种拼写错误的检查良好,但对第4种目前看并没有提供支持:
尝试实现下第4种。麻烦看下我这思路是否可行,一边看代码一边在写,有理解不对的地方请指出。
目前的实现,只有被认为是类的field,才会进行这种检查。因为在实际试用中,发现不这么做会检查出非常多的干扰项。
剩余可能还需要处理的: