-
Notifications
You must be signed in to change notification settings - Fork 26.5k
feat(language-service): modularize error messages #35678
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
Going through this I realized that a lot of the diagnostic messages are not actually ever tested for their generation. I will add tests for all of them in a future commit. |
25f6a0f
to
012f533
Compare
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.
A few minor comments, otherwise LGTM.
a38a147
to
821b7b8
Compare
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.
LGTM
Hi @ayazhafiz, would you mind rebasing with master to resolve the merge conflict? |
This commit performs a modularization of the Language Service's existing diagnostic messages. Such a modularization has two primary advantages: - Centralization and decoupling of error messages from the code that generates them makes it easy to add/delete/edit diagnostic messages, and allows for independent iteration of diagnostic messages and diagnostic generation. - Prepares for additional features like annotating the locations where a diagnostic is generated and enabling the configuration of which diagnostics should be reported by the language service. Although it would be preferable to place the diagnostics registry in an independent JSON file, for ease of typing diagnostic types as an enum variant of 'ts.DiagnosticCategory', the registry is stored as an object. Part of angular#32663.
821b7b8
to
4ab5707
Compare
Hey @ayazhafiz, there's now a lint error for the commits. Can you take a look?
|
5617498
to
e834ddb
Compare
Should be fixed :) |
This commit performs a modularization of the Language Service's existing diagnostic messages. Such a modularization has two primary advantages: - Centralization and decoupling of error messages from the code that generates them makes it easy to add/delete/edit diagnostic messages, and allows for independent iteration of diagnostic messages and diagnostic generation. - Prepares for additional features like annotating the locations where a diagnostic is generated and enabling the configuration of which diagnostics should be reported by the language service. Although it would be preferable to place the diagnostics registry in an independent JSON file, for ease of typing diagnostic types as an enum variant of 'ts.DiagnosticCategory', the registry is stored as an object. Part of #32663. PR Close #35678
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit performs a modularization of the Language Service's existing
diagnostic messages. Such a modularization has two primary advantages:
generates them makes it easy to add/delete/edit diagnostic messages,
and allows for independent iteration of diagnostic messages and
diagnostic generation.
diagnostic is generated and enabling the configuration of which
diagnostics should be reported by the language service.
Although it would be preferable to place the diagnostics registry in an
independent JSON file, for ease of typing diagnostic types as an enum
variant of 'ts.DiagnosticCategory', the registry is stored as an object.
Part of #32663.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?