jzbrooks / assertk-lint

Lint checks for assertk users
MIT License
4 stars 1 forks source link

Detect indexing into a List<T> as a parameter to assertThat #10

Closed jzbrooks closed 3 weeks ago

jzbrooks commented 9 months ago

assertk provides an index assertion that both asserts the index is valid and transforms the assertion subject to the value at that index.

assertk users should prefer this function of direct indexing for more consistent error messages.

jzbrooks commented 9 months ago

5 includes MapValueAssertion, which does a very similar thing for Map<T, U> assertions. The implementation should be conceptually similar.

A quick fix should be straightforward.