+1 to the idea.

How would this checkstyle rule work? Are you suggesting to start with a
number of exclusions? On what level will those exclusions be? Per file? Per
line?

Best,
Piotrek

wt., 25 kwi 2023 o 13:18 David Morávek <d...@apache.org> napisał(a):

> Hi Everyone,
>
> A long time ago, the community decided not to use Mockito-based tests
> because those are hard to maintain. This is already baked in our Code Style
> and Quality Guide [1].
>
> Because we still have Mockito imported into the code base, it's very easy
> for newcomers to unconsciously introduce new tests violating the code style
> because they're unaware of the decision.
>
> I propose to prevent Mockito usage with a Checkstyle rule for a new code,
> which would eventually allow us to eliminate it. This could also prevent
> some wasted work and unnecessary feedback cycles during reviews.
>
> WDYT?
>
> [1]
>
> https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#avoid-mockito---use-reusable-test-implementations
>
> Best,
> D.
>

Reply via email to