Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
strager opened this issue Dec 23, 2023 · 2 comments · May be fixed by #1219
Open

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

strager opened this issue Dec 23, 2023 · 2 comments · May be fixed by #1219
Assignees
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html

Comments

@strager
Copy link
Collaborator

strager commented Dec 23, 2023

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 strager added the for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html label Dec 23, 2023
@CoderMuffin
Copy link
Contributor

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

@strager
Copy link
Collaborator Author

strager commented Apr 27, 2024

@CoderMuffin Yeah, you can work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants