dart-lang / site-www

Source for Dart website
https://dart.dev
Other
969 stars 701 forks source link

Grammar mistake #6201

Open kq1231 opened 6 days ago

kq1231 commented 6 days ago

Page URL

https://dart.dev/tools/linter-rules/use_build_context_synchronously.html

Page source

https://github.com/dart-lang/site-www/tree/main/src/content/tools/linter-rules/individual-rules.md

Describe the problem

There's a grammar mistake.

Expected fix

Storing BuildContext for later usage can easily lead to difficult-to-diagnose crashes. Asynchronous gaps are implicitly storing BuildContext and are some of the easiest to overlook when writing code.

"difficult-to-diagnose" should be hyphenated as it is a compound adjective describing "crashes."

Additional context

No response

I would like to fix this problem.

MaryaBelanger commented 3 days ago

@bwilkerson use_build_context_synchronously seems to be one of those shared names you explained to me recently. So, where do we apply this fix? I'm guessing in the shared name description in diagnostics.md. But I also see the same line under deprecatedDetails for one of the unique names in messages.yaml, so I'm just making sure. Thanks!

bwilkerson commented 3 days ago

The source for the Diagnostic Messages page lives in the messages.yaml file in the linter package.

The diagnostic.md file is generated from the content in messages.yaml.

The deprecatedDetails section (also in messages.yaml) is what's published on https://dart.dev/tools/linter-rules/use_build_context_synchronously.

So it sounds like there are probably two places in the same file that need to be updated.