mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Java: Use strictcount instead of count for method counting
Co-authored-by: michaelnebel <michaelnebel@github.com>
This commit is contained in:
@@ -68,7 +68,7 @@ where
|
||||
mockCall.getParent+() = testMethod.getBody().getAStmt() and
|
||||
mockedClassOrInterface = mockCall.getMockedType() and
|
||||
// Only flag classes with multiple public methods (2 or more)
|
||||
count(Method m | m = mockedClassOrInterface.getAMethod() and m.isPublic()) > 1 and
|
||||
strictcount(Method m | m = mockedClassOrInterface.getAMethod() and m.isPublic()) > 1 and
|
||||
forex(Method method | method = mockedClassOrInterface.getAMethod() and method.isPublic() |
|
||||
exists(MockitoMockingMethodCall mockedMethod |
|
||||
mockedMethod.getMockitoMockCall() = mockCall and
|
||||
|
||||
Reference in New Issue
Block a user