Skip to content

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

Merged
merged 5 commits into from
Oct 8, 2021

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented Oct 8, 2021

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.

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Oct 8, 2021
@jcollins-g jcollins-g requested review from pq and kevmoo October 8, 2021 17:48
Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, otherwise :shipit:

- slash_for_doc_comments
- type_annotate_public_apis
# - unnecessary_brace_in_string_interps
always_declare_return_types: true
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@jcollins-g jcollins-g merged commit b4fa868 into dart-lang:master Oct 8, 2021
@jcollins-g jcollins-g deleted the linter-changes branch October 8, 2021 19:05
@@ -1,6 +1,6 @@
// WARNING: This file is auto-generated. Do not taunt.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not taunt!

Ha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants