Skip to content

Commit b6989e9

Browse files
committed
修改name-style提示
1 parent a9c0b6d commit b6989e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CodeService/src/Diagnostic/NameStyle/NameStyleChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ std::string NameStyleChecker::MakeDiagnosticInfo(std::string_view ruleName, LuaS
448448
auto data = rule.Data;
449449
if (data) {
450450
auto sameData = std::dynamic_pointer_cast<SameNameStyleData>(data);
451-
ruleMessage.append(util::format("'{}'", sameData->Param));
451+
ruleMessage.append(util::format("same '{}'", sameData->Param));
452452
}
453453

454454
break;

CodeService/src/Diagnostic/NameStyle/NameStyleRuleMatcher.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
bool NameStyleRuleMatcher::Match(LuaSyntaxNode &n, const LuaSyntaxTree &t, const std::vector<NameStyleRule> &rules) {
66
if (rules.empty()) {
7-
return false;
7+
return true;
88
}
9-
9+
1010
for (auto &rule: rules) {
1111
auto text = n.GetText(t);
1212
switch (rule.Type) {

0 commit comments

Comments
 (0)