Skip to content

invariant_booleans: false positive on comparisons #57734

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

Closed
pschiffmann opened this issue Jun 30, 2018 · 3 comments
Closed

invariant_booleans: false positive on comparisons #57734

pschiffmann opened this issue Jun 30, 2018 · 3 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@pschiffmann
Copy link

invariant_booleans reports the else if condition of the following code:

void f(int a, int b) {
  if (a < b) {
  } else if (b < a) {}
}

whereas this is correctly not reported:

void f(int a, int b) {
  if (a < b) {
  } else if (a > b) {}
}

I'm using the linter that is bundled with Dart 2.0.0-dev.66.0.

@pq pq added linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jul 1, 2018
@pq
Copy link
Member

pq commented Jul 1, 2018

/cc @alexeieleusis

@srawlins
Copy link
Member

Duplicate of #57684?

@pschiffmann
Copy link
Author

Duplicate of #57684?

Yes.

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants