AssertJUse¶
Issue ID AssertJUse ·
Severity Warning ·
Category Correctness ·
Default off (opt-in)
Flags assertion calls into AssertJ (org.assertj.core.api.Assertions) when the
project has standardised on assertk. Off by default — turn it on
explicitly if you want to reject AssertJ in this codebase.
Why¶
AssertJ and assertk overlap heavily, and mixing them in the same test suite gives readers a "which library do I use?" decision on every test. If the project's convention is assertk, this check enforces it.
Enabling¶
Example¶
Quick fix¶
Not provided. The two libraries' assertion shapes look similar but their import graphs and edge-case behaviour differ enough that a mechanical rewrite isn't safe. Replace imports manually.