oxc/misrefactored-assign-op Suspicious
What it does
https://rust-lang.github.io/rust-clippy/master/#/misrefactored_assign_op
Checks for a op= a op b or a op= b op a patterns.
Why is this bad?
Most likely these are bugs where one meant to write a op= b.
Examples
Examples of incorrect code for this rule:
javascript
a += a + b;
a -= a - b;Examples of correct code for this rule:
javascript
a += b;
a -= b;How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny oxc/misrefactored-assign-opjson
{
"rules": {
"oxc/misrefactored-assign-op": "error"
}
}