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

Report grammar identifier to didOpen telemetry events. #1106

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

rgrunber
Copy link
Contributor

Signed-off-by: Roland Grunberg [email protected]

for (ReferencedGrammarInfo info : referencedGrammarInfos) {
String kind = info.getBindingKind() == null ? "none" : info.getBindingKind();
String resolver = info.getResolvedBy();
String identifier = info.getIdentifierURI();
if ("xml".equals(fileExtension)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

the "xml".equals(fileExtension) should be replaced with a boolean

boolean isXML = !DOMUtils.isXSD(document) && !DOMUtils.isDTD(document);

because you can have another extension for xml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was also a second reference above. Should be fixed now.

- Fixes eclipse-lemminx#1105
- Do not report local grammars
- When exactly 1 grammar reference exists per file, simply send the
  relevant values (not a list of size 1). Otherwise, send the values as
  a list

Signed-off-by: Roland Grunberg <[email protected]>
@angelozerr angelozerr merged commit a3058b7 into eclipse-lemminx:master Aug 27, 2021
@angelozerr
Copy link
Contributor

Thanks @rgrunber

@rgrunber rgrunber deleted the fix-1105 branch August 27, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report schema identifier of XML document through telemetry event
2 participants