Do not report IgnoredReturnValue on lambda invocation that returns Unit#9192
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9192 +/- ##
============================================
- Coverage 85.03% 85.01% -0.02%
+ Complexity 4439 4434 -5
============================================
Files 571 571
Lines 12335 12336 +1
Branches 2694 2694
============================================
- Hits 10489 10488 -1
Misses 681 681
- Partials 1165 1167 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BraisGabin
approved these changes
Mar 27, 2026
schalkms
approved these changes
Mar 27, 2026
Member
|
Thank you very much! |
Contributor
|
Just checking can it be that this change triggers a new false-positive when upgrading from v2.0.0-alpha.2 to v2.0.0-alpha.3 in code like this: elementFunctions[qName]?.also { f ->
currentState = f(currentState, attributes, bodyContent.toString())
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9183
Check the return type from the function call's signature rather than from the symbol to remove false positives of
IgnoredReturnValueon lambda invocations that returnUnit.This is because the symbol's
returnTypeisRbecause the symbol itself is theinvokemethod, but the signature holds the actual lambda's signature and therefore correctly identifiedUnitas the return type.