-
Notifications
You must be signed in to change notification settings - Fork 127
Get rid of a backlog of potentially suboptimal coding practices in dartdoc #2830
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, otherwise
- slash_for_doc_comments | ||
- type_annotate_public_apis | ||
# - unnecessary_brace_in_string_interps | ||
always_declare_return_types: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a map here and no the (more conventional) list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is no way to say "false" in a list (unless there's something I'm missing), to override something in recommended/core. If I want to say false later I will have to convert to a map, so just do it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. There's a note about this short-coming in the docs:
https://dart.dev/guides/language/analysis-options#disabling-individual-rules
Unfortunate.
@@ -1,6 +1,6 @@ | |||
// WARNING: This file is auto-generated. Do not taunt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not taunt!
Ha!
Get us completely off of pedantic for lints/hints, fix all the problems highlighted by the "recommended" set, and eliminate declarations that are now duplicates in the analysis options.
The quoting lint actually discovered some (minimally consequential) bugs, where things that were supposed to be literal backslashes were being ignored. In some cases (generated code and tests mostly) I've added a few whole-file exceptions but most other exceptions I've tried to keep to a minimum.