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.
这个PR是重新引入命名风格检查. 但不再是通过editorconfig设置命名风格.
概述
命名风格检查支持基于基本命名法的检查:
同时也支持指定名称和正则表达式. 以及正则表达式和基本命名法的结合检查方式.
配置
开启命名风格检查需要添加配置:
在vscode的setting中增加配置项
Lua.nameStyle.config
, 可如下填写:可配置的项有:
每一个可配置项的格式都是相同的, 每个可配置项可配置的值支持如下格式:
表结构的一般形式是:
正则表达式的形式是:
正则语法为javascript正则语法.
正则表达式支持捕获组后再匹配基本命名法:
效果