-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Analyzer shouldn't complain about dartdocs on setters if there's a corresponding getter with a dartdoc #57328
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
cc @abarth |
Good point. What does @keertip ? |
Take a look at the "opacity" property in this dartdoc: http://docs.flutter.io/flutter/rendering/RenderOpacity-class.html Here the getter has a docstring but the setter does not. |
|
Thanks all. I'll update the check to look for docs on one or the other (or both). |
For Flutter we'd like, if there's both a getter and a setter but only one has a doc, for the doc to be on the getter, for consistency. |
Introduces: * Fix to `public_member_api_docs` to check for documented getters when checking setters (#237). * New `iterable_contains_unrelated_type` lint to detect when `Iterable.contains` is invoked with an object of an unrelated type. * New `comment_references` lint to ensure identifiers referenced in docs are in scope (#240). BUG= [email protected] Review URL: https://codereview.chromium.org//1992693003 .
Notably, this will allow us to play with * the fixed `public_member_api_docs` that now checks for documented getters when checking setters (https://github.com/dart-lang/linter/issues/237), and * the new `comment_references` lint that ensures identifiers referenced in docs are in scope (https://github.com/dart-lang/linter/issues/240).
Notably, this will allow us to play with * the fixed `public_member_api_docs` that now checks for documented getters when checking setters (https://github.com/dart-lang/linter/issues/237), and * the new `comment_references` lint that ensures identifiers referenced in docs are in scope (https://github.com/dart-lang/linter/issues/240).
It's very useful to be able to put dartdocs on setters specifically, even when the getter has one. However, most of the time, there's really nothing to say. It sets the thing that you can get, which is described in the getter.
It would be nice if we could silence the lint about dartdocs for the case of a setter with an identically named getter that already has a dartdoc.
cc @pq
The text was updated successfully, but these errors were encountered: