Closed h1alexbel closed 2 months ago
@volodya-lombrozo what do you think?
@h1alexbel I like this idea! We can implement it. However, it's better to check if somebody already implemented something similar inside other linters. Have you checked?
@volodya-lombrozo not yet, but I can take research this topic
@volodya-lombrozo assign me, please
@h1alexbel Thank you!
@rultor release, tag is 1.3.0
, title is 1.3.0
.
How about to detect Mockery anti-pattern?
Mockery definition: Sometimes mocking can be good, and handy. But sometimes developers can lose themselves in their effort to mock out what isn’t being tested. In this case, a unit test contains so many mocks, stubs, and/or fakes that the system under test isn’t even being tested at all, instead data returned from mocks is what is being tested.
Example:
in
pom.xml
we can introduce new parametermaxNumberOfMocks
:Thus, using example above,
jtcop
should fail with message like this: