Skip to content

Commit 63b8e77

Browse files
committed
Use regexpFind instead of regexpMatch
Otherwise we need to match the entire receiver.
1 parent 45aa850 commit 63b8e77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp/autosar/src/codingstandards/cpp/HardwareOrProtocolInterface.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ abstract class HardwareOrProtocolInterfaceClass extends Class { }
55

66
class HardwareOrProtocolInterfaceComment extends Comment {
77
HardwareOrProtocolInterfaceComment() {
8-
getContents().regexpMatch("(?m)^\\s*(//|\\*)\\s*@HardwareOrProtocolInterface\\s*$")
8+
exists(getContents().regexpFind("(?m)^\\s*(//|\\*)\\s*@HardwareOrProtocolInterface\\s*$", _, _))
99
}
1010
}
1111

cpp/common/src/codingstandards/cpp/rules/orderingpredicatemustbestrictlyweak/OrderingPredicateMustBeStrictlyWeak.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Query getQuery() { result instanceof OrderingPredicateMustBeStrictlyWeakSharedQu
1616

1717
class IsStrictlyWeaklyOrderedComment extends Comment {
1818
IsStrictlyWeaklyOrderedComment() {
19-
getContents().regexpMatch("(?m)^\\s*(//|\\*)\\s*@IsStrictlyWeaklyOrdered\\s*$")
19+
exists(getContents().regexpFind("(?m)^\\s*(//|\\*)\\s*@IsStrictlyWeaklyOrdered\\s*$", _, _))
2020
}
2121
}
2222

0 commit comments

Comments
 (0)