-
Notifications
You must be signed in to change notification settings - Fork 700
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
☂ [Tracking] Restructure diagnostic message docs #4499
Comments
The existing diagnostic messages don't actually have a single line summary, what appears to be a summary is actually the message that's displayed to users in the IDE. We have it there to assure users that they've found the correct documentation. I'll note, however, that the IDEs also display a correction message (when there is one; not all diagnostics have such a message), which isn't displayed on these pages. The reason it's not displayed is because it's usually a subset of the possible fix options discussed under "Common fixes".
That particular CL is related to the non-lint diagnostic messages, though I suppose that the same process can, and should, be used for both kinds of messages.
That's not accurate. Many lints have quick fixes, but not all of them do, and non-lint diagnostics sometimes have quick fixes, though it's a smaller percentage than for lints. |
Wasn't sure which issue to post this in, but I continued a discussion on page length and multiple pages here: #4498 (comment)
|
Thanks @bwilkerson, I'll update all these details up top.
I think what I meant was the non-lint diagnostic message docs don't mention if they have a quick fix or not, but some of the lint docs do (is that accurate? quick ctrl+f "quick fix" on diagnostic-messages shows nothing). I'll update that at the top, thanks for pointing out.
I also think the same process should eventually be used for both. Like the format of the messages themselves, I think it makes sense to standardize work around the non-lint messages (already very standardized), and then integrate those practices into lint work (as much as possible with the more variant nature of lints) @parlough I was expecting that conversation to be pretty active so I broke it out, but once a decision is reached I'll update up top with the conclusion. I think as work actually starts for each of these items, they'll probably all warrant their own issues! |
That's correct.
All of the lints that have a quick fix associated with them have a badge that indicates that fact. If there's no badge then it's because there's no fix. (The badges are programmatically added so that they can't be out of date.) |
Check these issues to be sure you capture everything: https://github.com/dart-lang/site-www/issues?q=is%3Aissue+is%3Aopen+sort%3Acreated-asc+label%3Adiagnostics |
This PR is meant to finalize work to make dart.dev a satisfactory replacement for [`dart-lang.github.io/linter/`](https://dart-lang.github.io/linter/) while `dart-lang/linter` moves to the SDK and we work on consolidating and improving documentation (#4498). It does this by (staged links after colon (`:`)): - Updating the information on dart.dev/lints for the latest state of the linter: [/lints](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/tools/linter-rules) - Making dart.dev/lints an index page rather than including all information: [/lints](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/tools/linter-rules) - Moving the long-form lint rule documentation to individual pages found at `dart.dev/lints/<rule>`: [/lints/avoid_dynamic_calls](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/lints/avoid_dynamic_calls) - It does this by using a Jekyll page generator based on `linter_rules.json`. - Adding a textual reference pointing to the recently released all linter rules page (38973de) found at: [/lints/all](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/lints/all) - Updating and links and references for these previous changes (mostly Effective Dart). Contributes to dart-lang/linter#4460, #4498, #4499 **Note:** This is an intermediate step and doesn't aim to improve the formatting or style of the information on the index or individual pages. That will be part of follow-up work as we work on improvements to the diagnostic linter rule documentation.
Removes the remaining links to the old linter site, to the guaranteed dart.dev/lints redirect. Contributes to dart-lang/linter#4460 and dart-lang/site-www#4499
Bug: dart-lang/linter#4460 and dart-lang/site-www#4499 Change-Id: Ieb90512aac4e476b922765c6ee191085a2ad2c9b CoreLibraryReviewExempt: Only updates a link in documentation comments. Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311880 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
This PR is meant to finalize work to make dart.dev a satisfactory replacement for [`dart-lang.github.io/linter/`](https://dart-lang.github.io/linter/) while `dart-lang/linter` moves to the SDK and we work on consolidating and improving documentation (dart-lang#4498). It does this by (staged links after colon (`:`)): - Updating the information on dart.dev/lints for the latest state of the linter: [/lints](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/tools/linter-rules) - Making dart.dev/lints an index page rather than including all information: [/lints](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/tools/linter-rules) - Moving the long-form lint rule documentation to individual pages found at `dart.dev/lints/<rule>`: [/lints/avoid_dynamic_calls](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/lints/avoid_dynamic_calls) - It does this by using a Jekyll page generator based on `linter_rules.json`. - Adding a textual reference pointing to the recently released all linter rules page (dart-lang@38973de) found at: [/lints/all](https://dart-dev--pr4999-feature-linter-indiv-zetj76b0.web.app/lints/all) - Updating and links and references for these previous changes (mostly Effective Dart). Contributes to dart-lang/linter#4460, dart-lang#4498, dart-lang#4499 **Note:** This is an intermediate step and doesn't aim to improve the formatting or style of the information on the index or individual pages. That will be part of follow-up work as we work on improvements to the diagnostic linter rule documentation.
Lints no longer are part of three specific groups, but now have tags/groups (dart-lang/linter#1020). This PR removes the expectation of the three groups so that the lints keep rendering. It also updates the source data to the latest version with no groups. As part of the work in #4499, we'll surface the new categories/tags later on :) Closes dart-lang/sdk#56396
There are a lot of small inconsistencies across the diagnostic messages documentation that altogether make the topic's content appear disjointed. For example,
Goal: Restructure the diagnostic message documentation to be more consistent, across messages, pages, and sites.
This issue is for planning/tracking. Most of the points can be addressed asynchronously. Some of the relevant content and the work described lives outside of this repo.
1. Consolidate linter rules with other diagnostic messages
Decision: TBD / Needs input
Issue: #4498
2. Consistent format and information across diagnostic messages
Decision: Rewrite individual linter rules to match diagnostic message format
Issue: dart-lang/linter#3924
The diagnostic messages have a more exact/succinct format to them than the lint messages, so we'll rewrite the lint messages to match that syntax.
This means using the structure of:
Also need to standardize other features of lint messages not included in diagnostic messages:
@atsansone I know you had ideas about restructuring or standardizing the layout of individual messages, if you want to share here
3. Deprecate github.io/linter
Decision: repoint all the tools to dart.dev/tools/linter-rules and BE CAREFUL WITH REDIRECTS
Hosting the lint docs on github.io was decided before the linter rules were added to dart.dev. Now that they're on dart.dev (where they should be, to keep docs in one place), the io page should be deprecated.
A lot of tools point to the io pages though, so the redirects need to be dealt with very carefully.
4. Update how to enable lint instructions
Decision: page hasn't been reviewed in a while, make sure it's up to date
https://dart.dev/guides/language/analysis-options
5. Create guidance page for which lints to use
Decision: Add a page to the static analysis set of pages that provides guidance on which lints to enable for your needs
This will go into detail on the existing common lint sets, and maybe other use cases.
Recreate this page in dart.dev that groups lints by purpose: https://dart-lang.github.io/linter/lints/index.html
6. Standardize process for contributing lint messages
Decision: Document the exact format we decide on for linter rules, and a plan for how they are reviewed
Being addressed here:
Trial for reviewing in CLs: https://dart-review.googlesource.com/c/sdk/+/278640
7. Misc. improvements to diagnostic messages
Decision: pros and cons / benefit vs. cost of each of these needs further evaluation
Adding labels / icons / some other indicators to message docs that indicate things like:
8. (Tangential) Consolidate type promotion error pages
Slightly related to diagnostic messages because some link to Type promotion failures page
Issue: #4393
9. (Tangential) Use the diagnostics glossary as a starting point for a standard site-wide glossary
The Glossary section on the Diagnostic messages page has a wealth of information that is really applicable to the site as a whole. We've discussed taking that content out and putting it on a new page (already created, https://dart.dev/resources/glossary). This would require all the links in the diagnostic and linter docs be updated to point to the same sections on the new page.
Issue: #4622
@bwilkerson @pq
The text was updated successfully, but these errors were encountered: