Check for unused AssertJ/FEST boolean assertion (e.g. assertThat(<expr>);)
Open
Type-NewCheck
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
[AssertJ](http://joel-costigliola.github.io/assertj/) and [FEST](https://github.com/alexruiz/fest-assert-2.x) assertions are commonly used in different projects. Boolean assertions take the form `assertThat().isTrue();` or `assertThat().isFalse();`.
A common mistake, visually easy to miss, is to just write `assertThat();`. Someone unfamiliar with the assertion library may assume this would check that the expression evaluates to true. However, no assertion is made on the evaluated expression. I propose error-prone has a FAIL check on `assertThat();`.
Contributor guide
Assessment
This issue has not been assessed yet.