Mockito provides _argument matchers_ and _argument captors_ for flexibly stubbing or verifying method calls.
``++Mockito.verify()++``, ``++Mockito.when()++``, ``++Stubber.when()++`` and ``++BDDMockito.given()++`` each have overloads with and without argument matchers.
However, if argument matchers or captors are used only on some of the parameters, all the parameters need to have matchers as well, otherwise an ``++InvalidUseOfMatchersException++`` will be thrown.
This rule consequently raises an issue every time matchers are not used on all the parameters of a stubbed/verified method.
=== on 3 Dec 2020, 10:23:27 Quentin Jaquier wrote:
Note that this is a low priority rule as tests would fail if this bug is present. It can however be useful for SonarLint users as they will be able to see their mistakes more rapidly. It won't add much value for SonarQube/SonarCloud users.