quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

12$: warn on 'x == y;' statement

Open strager opened this issue 1 year ago • 2 comments

The following C++ code has a bug:

  for (Used_Variable &used_var : current_scope.variables_used) {
    if (used_var.kind == Used_Variable_Kind::use) {
      used_var.kind == Used_Variable_Kind::use_in_type;
    }
  }

JavaScript code might have a similar bug. For example:

let x;
x == 42;

quick-lint-js should warn about such redundant == (or ===) and suggest = instead.

strager avatar Dec 23 '23 03:12 strager

Hi @strager, I would love to tackle this issue if that's ok :)

CoderMuffin avatar Apr 24 '24 15:04 CoderMuffin

@CoderMuffin Yeah, you can work on this issue.

strager avatar Apr 27 '24 22:04 strager