JetBrains / JetBrains/resharper-unity
"Comparison to null is expensive" and "unity lifetime check" icon on implicit lifetime check, but not on explicit
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
If you compare a unity object against null, you get the "Comparison to null is expensive" warning and the "implicit check for unity object lifetime" icon.


If you then convert it to the explicit check per resharper suggestion, both hints disappear, even though the check is still performed.


Expected:
Both icon and hint for expensive operation should still be there.
Contributor guide
Research direction
Start by reproducing the Unity object comparison and explicit lifetime-check cases described in the issue, then locate the inspection responsible for the warning and lifetime icon. Done means the explicit check still reports both the expensive-operation hint and the implicit Unity lifetime-check icon, with coverage for both forms if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100