Expected Behavior of the rule
IgnoredReturnValue message should only show the name of the call that did not have its return value checked, not the entire expression.
Context
IgnoredReturnValue is flagged for this code:
.subscribe { recordList ->
database.transaction {
database.zone_RecordQueries.delete_by_zone_id(domainName)
insertRows(recordList)
}
}
And the message reported is
The call subscribe { recordList ->
database.transaction {
database.zone_RecordQueries.delete_by_zone_id(domainName)
insertRows(recordList)
}
} is returning a value that is ignored.
I think the message should change to show only subscribe in this case, since that's the name of the method that was called, and did not have it's return value checked. The contents of {} block is not relevant. Likewise for example observeOn(Schedulers.io()) only observeOn needs to be shown in the message.
Expected Behavior of the rule
IgnoredReturnValue message should only show the name of the call that did not have its return value checked, not the entire expression.
Context
IgnoredReturnValueis flagged for this code:.subscribe { recordList -> database.transaction { database.zone_RecordQueries.delete_by_zone_id(domainName) insertRows(recordList) } }And the message reported is
I think the message should change to show only
subscribein this case, since that's the name of the method that was called, and did not have it's return value checked. The contents of{}block is not relevant. Likewise for exampleobserveOn(Schedulers.io())onlyobserveOnneeds to be shown in the message.