assertk-lint¶
A set of Android Lint rules to encourage proper use of assertk — catch common assertion mistakes at compile time and steer tests toward fluent, readable, and reliable assertions.
-
Drop-in
One line in
build.gradle.kts. Works on Android and JVM modules with thecom.android.lintplugin. No detector configuration required for the default checks. -
Catches what tests miss
Two of the checks fire as errors — assertion subjects without assertions, and
equals()calls on assertion subjects — because the surrounding test will silently pass either way. -
IDE quick fixes
Most checks ship a quick fix. Replace JUnit/
kotlin.test/assert(...)calls with the assertk equivalent without leaving the editor. -
On Maven Central
Published as
com.jzbrooks:assertk-lint. MIT licensed. Issue IDs are stable; new checks are introduced behind explicit version bumps.