qos-ch / slf4j

Simple Logging Facade for Java
http://www.slf4j.org
MIT License
2.34k stars 990 forks source link

Help static analysis tools to detect non-terminated fluent API calls #305

Closed KengoTODA closed 2 years ago

KengoTODA commented 2 years ago

This PR suggests using internal @ CheckReturnValue annotations to annotate non-terminated fluent APIs. By these annotations, static analysis tools like Errorprone can detect non-terminated fluent API calls, which should be misuse of SLF4J API.

refs https://github.com/KengoTODA/errorprone-slf4j/issues/143

ceki commented 2 years ago

PR without a Jira issue have a tendency to fall in between the cracks.

I have created SLF4J-567 to keep track.