File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
CodeFormatCore/src/Diagnostic/NameStyle Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ bool NameStyleRuleMatcher::SnakeCase(std::string_view source) {
8888 break ;
8989 }
9090 case ParseState::Underscore: {
91- if (::islower (ch)) {
91+ if (::islower (ch) || :: isdigit (ch)) { // after the first underscore, sections might also begin with digits
9292 state = ParseState::Letter;
9393 } else {
9494 return false ;
@@ -135,7 +135,7 @@ bool NameStyleRuleMatcher::UpperSnakeCase(std::string_view text) {
135135 break ;
136136 }
137137 case ParseState::Underscore: {
138- if (::isupper (ch)) {
138+ if (::isupper (ch) || :: isdigit (ch)) { // after the first underscore, sections might also begin with digits
139139 state = ParseState::Letter;
140140 } else {
141141 return false ;
You can’t perform that action at this time.
0 commit comments