Skip to content

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

Open
@strager

Description

@strager

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.

Metadata

Metadata

Assignees

Labels

for hireGet paid for working on this task: https://quick-lint-js.com/hiring.html

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions