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: warn if public member returns private type #6865
Comments
Added Area-Analyzer, Triaged labels. |
Added this to the M3 milestone. |
Removed Type-Defect label. |
Removed this from the M3 milestone. |
This comment was originally written by amouravski@google.com Added Editor-AnalysisEngine label. |
Removed AnalysisEngine, Editor-AnalysisEngine labels. |
Also: void doWork(_PrivateType value) {} |
We need to think about whether there's any way to produce valid information without false positives. Consider, for example, private classes with public subclasses (for the parameter case) or private classes that implement public interfaces (for the return type case). Removed Priority-Medium label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
@bwilkerson I could have sworn there was an issue tracking a similar idea in the |
I have a tool that does that and more. I don't have it in the form of a lint rule, but it could be converted easily enough if someone had the time. |
Personally, I don't care which issue tracker lint-related issues are in. |
This issue was moved to dart-lang/linter#1054 |
Scenario:
class _PrivateType {
}
_PrivateType getInfo() {
// do something
}
getInfo
is public, but the return type is private to the library. Would be great to get a warning in this case.The text was updated successfully, but these errors were encountered: