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

[analyzer] Type aliases are not working well with the always_specify_types rule  #2692

Closed
AlexV525 opened this issue Jun 3, 2021 · 10 comments · Fixed by #2761
Closed

[analyzer] Type aliases are not working well with the always_specify_types rule  #2692

AlexV525 opened this issue Jun 3, 2021 · 10 comments · Fixed by #2761
Labels
false-positive new-language-feature type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@AlexV525
Copy link
Contributor

AlexV525 commented Jun 3, 2021

typedef JsonMap = Map<String, dynamic>;
typedef JsonList = List<JsonMap>;

image

This tracker is for issues related to: Analyzer

  • Dart SDK Version: 2.13.1
  • macOS BigSur
@lrhn lrhn transferred this issue from dart-lang/sdk Jun 3, 2021
@srawlins srawlins added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 3, 2021
@AlexV525
Copy link
Contributor Author

AlexV525 commented Jun 16, 2021

@srawlins Any priority on this? It's preventing us to use type alias since it raises warnings.

@srawlins
Copy link
Member

@AlexV525 no priority on this yet.

@pq I'm not sure how we prioritize false positives...

@bwilkerson
Copy link
Member

In my opinion, false positives should generally have a high priority because they erode user trust.

@AlexV525
Copy link
Contributor Author

Another false positive about always_specify_types #2671 .

@pq
Copy link
Member

pq commented Jun 16, 2021

+1 to what Brian said. As far as prioritizing relative to other false positives, I (informally) apply a multiplier for issues impacting core/recommended/pedantic/flutter lints. I'm looking at making this more formal FWIW... (And if anyone wants to brainstorm about that, let me know!)

@srawlins
Copy link
Member

I think each false positive would get a priority bump also because they don't require cleanup, if the fix really means that no new cases would be reported.

@AlexV525
Copy link
Contributor Author

And now it's the "New feature has come, but it's not really come" thing since we can't really put it into production... 😓 An issue for a new feature might have a priority bump too?

@srawlins
Copy link
Member

Can you not // ignore the lint reported? I don't think this should block adoption of new type aliases.

@AlexV525
Copy link
Contributor Author

We could, but we shouldn't. The profit that type aliases bring is less than the code quality drop's effects. Consider that we have multiple classes that would need to use Json alias, then we'll going to ignore it everywhere when we use it.

@AlexV525
Copy link
Contributor Author

AlexV525 commented Jul 7, 2021

And after the brainstorm here this issue still don't have a priority which is still blocking us to migrate...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive new-language-feature 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.

4 participants