Skip to content
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

[analyzer/linter] Consolidate still relevant information from rules.json into messages.yaml #56835

Open
7 of 21 tasks
parlough opened this issue Oct 2, 2024 · 0 comments
Open
7 of 21 tasks
Assignees
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation

Comments

@parlough
Copy link
Member

parlough commented Oct 2, 2024

As we introduce diagnostic style documentation for lint rules in pkg/linter/messages.yaml, we should collocate other relevant linter rule and lint code information in the same messages.yaml file. While doing so, we can move the old lint documentation information out of source code. This will help us to simplify and generalize the LintRule class, and in some cases, reduce the amount of strings that get included in the analysis server executable.

  • Link to hosted version of new diagnostic docs when it's written and marked published (91254e4)
  • Move since information from tools/since/sdk.yaml to messages.yaml (62a52ed)
  • Generate info needed by both docs and source from messages.yaml
    • LintCode (1f4f0d3)
    • LintRule#description (TODO: @parlough)
    • LintRule#incompatibleRules (TODO: @parlough)
    • LintRule#state (TODO: @parlough)
    • LintNames enumeration (a409a1c)
    • Maybe: Registration functionality from linter/lib/src/rules.dart (TODO: @parlough)
  • Remove various info from source, move to messages.yaml if needed for docs

Once relevant data is migrated:

  • Improve and clean up validation of and generation from messages.yaml (1b6fe34)
  • Move downstream users away from machine/rules.json
    • dart-lang/site-www
    • dart-lang/lints
    • Other users?
  • Delete generation code and tests of machine/rules.json
  • Remove the generated machine/rules.json file from the SDK and dart-lang/site-www
  • Fully remove the LintRule and LintCode members that were deprecated as part of this work
@parlough parlough added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-documentation A request to add or improve documentation analyzer-linter Issues with the analyzer's support for the linter package labels Oct 2, 2024
@parlough parlough self-assigned this Oct 2, 2024
@scheglov scheglov added the P3 A lower priority bug or feature request label Oct 3, 2024
copybara-service bot pushed a commit that referenced this issue Oct 3, 2024
This helps to avoid any accidental mispellings, enables find usages, and potentially makes future renames easier.

The primary goal is to make future work in #56835 easier.

Change-Id: I684630a4d6cb145031de0dabc221f247246ea00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388042
Reviewed-by: Brian Wilkerson <[email protected]>
Auto-Submit: Parker Lougheed <[email protected]>
Commit-Queue: Phil Quitslund <[email protected]>
Reviewed-by: Phil Quitslund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

2 participants