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

WIP: avoid_future_catcherror rule #4068

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

christopherfujino
Copy link
Member

TODO description

@coveralls
Copy link

coveralls commented Feb 14, 2023

Coverage Status

Coverage: 95.648% (-0.02%) from 95.664% when pulling 0a2c44b on christopherfujino:avoid-future-catcherror into e963114 on dart-lang:main.

@srawlins
Copy link
Member

Quick drive by as this would require a lot of rename work: We typically convert camelCase to snake_case, like in avoid_type_to_string or no_logic_in_create_state (ignore avoid_function_literals_in_foreach_calls and no_runtimeType_toString! 🤣 ).

@christopherfujino
Copy link
Member Author

Quick drive by as this would require a lot of rename work: We typically convert camelCase to snake_case, like in avoid_type_to_string or no_logic_in_create_state (ignore avoid_function_literals_in_foreach_calls and no_runtimeType_toString! rofl ).

so s/avoid_future_catcherror/avoid_future_catch_error, or other updates too?

@srawlins
Copy link
Member

Oh, also, we I think are trying to avoid the word avoid. @pq would this be just future_catch_error?

In any case, you don't have to put more work into this until we settle on what kind of lint rule we want.

@christopherfujino
Copy link
Member Author

Oh, also, we I think are trying to avoid the word avoid. @pq would this be just future_catch_error?

In any case, you don't have to put more work into this until we settle on what kind of lint rule we want.

ack on both points.

auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 7, 2024
….catchError (#140122)

Ensure tool code does not use Future.catchError or Future.onError, because it is not statically safe: dart-lang/sdk#51248.

This was proposed upstream in dart-lang/linter in dart-lang/linter#4071 and dart-lang/linter#4068, but not accepted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants