`ShouldNotBeTrueInspection` false positive
See original GitHub issueKotest: 4.6.1
Repro steps:
Given following code:
val someVariable: Boolean? = null
someVariable shouldNotBe true
IDE shows a warning and suggests a replacement that will fail the test
Use-case
In my specific case I want to verify if google’s LiveData
instance doesn’t have specific value. I don’t care if it is false or null - I consider that an implementation detail. I assumed making an shouldNotBe true
is a valid way of checking that but IDE shows a warning with an invalid fix hence this issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
The “false positive paradox” and why we shouldn't test ...
It's a paradox because even quite accurate tests can lead to high levels of false positives when used widely in a population with...
Read more >6 reasons why you shouldn't get an inspection done by ...
Reason #2: They might cause significant damage to your dream home ... A home inspection is a non-invasive process and the home has...
Read more >At-Home COVID Test Accuracy: What to Know About Negative ...
One popular test misses around 15 out of 100 infections — these are called “false negatives” — and gives a false positive result...
Read more >Collection of false positives for inspection: "Assignment is not ...
I recently upgraded from 2.3.1.4441 to 2.4.0.4488 and I'm reasonably confident that these false positives haven't been showing up before the ...
Read more >Spotlight on security: The Curse of the False Positive
Obviously, a false negative/missed detection matters. How much it matters depends on quite a few factors, such as how widespread the real but ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So yeah I would just remove it and we can play with the types for the shouldBe analysis.
@Kantis we talked about just removing this inspection.