detekt/detekt

Allow to add calls to `IgnoredReturnValue`

开放

#6,459 创建于 2023年9月3日

 (5 条评论) (0 个反应) (0 位负责人)Kotlin (834 个派生)batch import
help wantedrules

仓库指标

星标
 (6,942 个星标)
PR 合并指标
 (平均合并 4天 9小时) (30 天内合并 65 个 PR)

描述

Expected Behavior of the rule

There are some functions that their return value should be handled, otherwise they shouldn't be called. The main examples are: toString, equals and hashCode. If you call them you should do something with its output. Otherwise, you don't call it. I would like to be able to list those functions.

This rule has a lot of configurations right now and it even have two modes of work so I'm not 100% sure which should be the way to proceed here.

Context

detekt should be able to find errors like this one: #6458

贡献者指南