Repository navigation
Also check USELESS_ELVIS in UnreachableCode - #6624
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6624 +/- ##
=========================================
Coverage 85.13% 85.13%
- Complexity 4079 4081 +2
=========================================
Files 570 570
Lines 13363 13364 +1
Branches 2402 2402
=========================================
+ Hits 11376 11377 +1
Misses 791 791
Partials 1196 1196 ☔ View full report in Codecov by Sentry. |
967e12a to
164b543
Compare
|
I understand why this is added to the existing unreachable code rule but I believe this should be implemented as a separate rule since it's a wrapper of an existing compiler warning. I don't think wrapped compiler warnings should be consolidated in the same rule. And very technically speaking the Elvis operator itself is not unreachable - it will always be hit. |
I'm not sure about this. It's true, it's easy to think "two different rules" looking at the implementation. But, as a user, both are unreachable code so I think that it is ok to merge them. A new rule will help to make this more configurable but I think that we don't need such configuration. |
* Also check `USELESS_ELVIS` in `UnreachableCode` * Remove unnecessary `?: return` from TC code * Use `||` instead of list and `in`
* Also check `USELESS_ELVIS` in `UnreachableCode` * Remove unnecessary `?: return` from TC code * Use `||` instead of list and `in`
* Also check `USELESS_ELVIS` in `UnreachableCode` * Remove unnecessary `?: return` from TC code * Use `||` instead of list and `in`
Fixes #6623