Skip to content

Commit 787d33a

Browse files
Additional feedback, fix expected file
1 parent 3a34d2a commit 787d33a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cpp/misra/src/rules/RULE-5-10-1/PoorlyFormedIdentifier.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ predicate isReservedLiteralSuffix(Function f, IdentifierIntroduction intro) {
4848
}
4949

5050
predicate isReservedNamespace(Namespace ns) {
51-
ns.getName().regexpMatch("std\\d+") or ns.getName() = "posix"
51+
ns.getName().regexpMatch("std\\d*") or ns.getName() = "posix"
5252
}
5353

5454
bindingset[s]

cpp/misra/test/rules/RULE-5-10-1/PoorlyFormedIdentifier.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
| test.cpp:112:1:112:27 | MACRO_with_lower | Identifier 'MACRO_with_lower' contains lowercase characters. |
2323
| test.cpp:113:1:113:26 | MACRO_123_lower | Identifier 'MACRO_123_lower' contains lowercase characters. |
2424
| test.cpp:114:1:114:25 | macro_ALL_CAPS | Identifier 'macro_ALL_CAPS' contains lowercase characters. |
25-
| test.cpp:115:1:115:23 | MACRO$DOLLAR | Identifier 'MACRO$DOLLAR' contains invalid characters. |
25+
| test.cpp:115:1:115:23 | MACRO$DOLLAR | Identifier 'MACRO$DOLLAR' contains invalid characters. |
2626
| test.cpp:116:1:117:11 | x | Identifier 'x' contains lowercase characters. |
2727
| test.cpp:121:1:121:38 | __Y | Identifier '__Y' contains double underscores. |
2828
| test.cpp:121:1:121:38 | __Y | Identifier '__Y' starts with underscore. |
29+
| test.cpp:125:5:125:6 | l1 | Identifier 'l1' is defined in reserved namespace. |
2930
| test.cpp:134:5:134:6 | l2 | Identifier 'l2' is defined in reserved namespace. |
3031
| test.cpp:138:5:138:6 | l3 | Identifier 'l3' is defined in reserved namespace. |
3132
| test.cpp:142:5:142:6 | l4 | Identifier 'l4' is defined in reserved namespace. |

0 commit comments

Comments
 (0)