S1125: erroneous quick fix suggestion when negating a binary operation

Description

In S1125, we sometimes negate expressions in the suggested quick fix. When this expression is a binary operation, we naively add a negation in front. This can result in wrong syntax at best, and even break the logic in the worst case.

It seems that covering all the cases seems tricky. We might want to simplify and simply don't suggest a quick fix if the expression is a binary operation.

Activity

Dorian BurihabwaOctober 17, 2022 at 9:03 AM
Edited

Validated by applying quick fixes on test sources locally

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

Sentry

Created May 3, 2022 at 9:47 AM
Updated October 16, 2024 at 2:07 PM
Resolved October 17, 2022 at 9:03 AM