-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Flag two opposite conditions next to each other #57271
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
Comments
This should be linted now that dart-archive/linter#229 is merged. I think it is not currently but fixing that should be easy. I might add a test to confirm @pq can you assign this to me? |
Once you accept the collaborator invite, you should be able to self-assign... |
Is this linted? If so, we can close this bug. Ideally, add the name of the lint here so people can find it through this bug. |
This should be linted by |
@alexeieleusis : is there a test case that confirms it? |
Sorry, I forgot to point and close, this verifies it https://github.com/dart-lang/linter/blob/master/test/rules/invariant_booleans.dart#L237 |
Cool. Thanks @alexeieleusis ! Seems like this is safe to close? |
I just saw the extra mutation condition, previous one with this https://github.com/dart-lang/linter/blob/master/test/rules/invariant_booleans.dart#L428 should provide the desired behavior. |
The intent of this code is: if you encounter a double quote, skip all characters until you encounter another one.
It should be clear to the static analyzer that the while loop can never execute. (There should be another
i += 1
before the while loop.)The text was updated successfully, but these errors were encountered: