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

omit_local_variable_types conflicts with --no-implicit-dynamic #57710

Closed
natebosch opened this issue May 24, 2018 · 9 comments · Fixed by dart-lang/linter#1594
Closed

omit_local_variable_types conflicts with --no-implicit-dynamic #57710

natebosch opened this issue May 24, 2018 · 9 comments · Fixed by dart-lang/linter#1594
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@natebosch
Copy link
Member

Specifically this conflicts with strong_mode_implicit_dynamic_variable.

@pq
Copy link
Member

pq commented May 24, 2018

/cc @bwilkerson

@srawlins
Copy link
Member

Linter rules and analyzer modes can conflict. What is the bug and what would you like the fix to be?

@natebosch
Copy link
Member Author

At the time I wanted dynamic to be an allowed exception to omit_local_variable_types. I've hit other blockers to --no-implicit-dynamic so it hasn't been something I've pushed on.

@srawlins
Copy link
Member

I see. So in this example:

dynamic x = 0;
dynamic y = x;

you'd like omit_local_variable_types to not complain. Seems reasonable.

@pq
Copy link
Member

pq commented May 31, 2019

Is the proposal to make this conditional on whether no-implicit-dynamic is enabled?

@natebosch
Copy link
Member Author

In my opinion it doesn't need to be conditional. dynamic is dangerous - if you're using it and want to make it explicit I think the lint should allow that regardless of other configuration.

@pq
Copy link
Member

pq commented May 31, 2019

@bwilkerson: any thoughts/reservations?

@bwilkerson
Copy link
Member

The purpose of this rule is to enforce the style guide. I don't know whether the style guide has changed since I last looked at it, but it seems to me that making dynamic an exception is consistent with the guide.

@pq
Copy link
Member

pq commented May 31, 2019

dart-lang/linter#1594 👍

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

Successfully merging a pull request may close this issue.

5 participants