Skip to content

[Java.Interop.Tools.JavaSource] Fix tag parsing errors #997

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

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Jun 22, 2022

The number of "## Unable to translate remarks for ..." errors have been
cut nearly in half, from 740 to 391.

The rules for @param, @return, @throws, and @unknown have been
updated to handle more variations of these tags. In some cases, these
tags are only followed by a single word or no content at all.

New line character filters have been added to nonSpaceTerm to fix
instances where an "empty" tag would be merged with the tag on the
following line.

See Android.Database.DatabaseUtils.GetCollationKey(String) as
an example.

Before nonSpaceTerm change:

    <param name="name">To be added.</param>
    <param name="name&#xA;@return&#xA;@return">the collation key</param>
    <summary>return the collation key</summary>
    <returns>To be added.</returns>

After nonSpaceTerm change:

    <param name="name">name</param>
    <summary>return the collation key</summary>
    <returns>the collation key</returns>

New (mostly empty) rules for @hide, @inheritDoc, and @{see} tags
have also been added.

@pjcollins pjcollins changed the title Fix a handful of remarks parsing exceptions [Java.Interop.Tools.JavaSource] Fix tag parsing errors Jun 28, 2022
The number of "## Unable to translate remarks for ..." errors have been
cut nearly in half, from 740 to 391.

The rules for `@param`, `@return`, `@throws`, and `@unknown` have been
updated to handle more variations of these tags.  In some cases, these
tags are only followed by a single word or no content at all.

New line character filters have been added to `nonSpaceTerm` to fix
instances where an "empty" tag would be merged with a tag on a new line.

See [`Android.Database.DatabaseUtils.GetCollationKey(String)`][0].

Before `nonSpaceTerm` change:

    <param name="name">To be added.</param>
    <param name="name&#xA;@return&#xA;@return">the collation key</param>
    <summary>return the collation key</summary>
    <returns>To be added.</returns>

After `nonSpaceTerm` change:

    <param name="name">name</param>
    <summary>return the collation key</summary>
    <returns>the collation key</returns>

New (mostly empty) rules for `@hide`, `@inheritDoc`, and `@{see}` tags
have also been added.

[0]: https://github.com/xamarin/android-api-docs/blob/a7e914965a0e80c9454149399551d87a18997b2e/docs/Mono.Android/en/Android.Database/DatabaseUtils.xml#L1505-L1508
@pjcollins pjcollins marked this pull request as ready for review June 28, 2022 21:03
@pjcollins pjcollins requested a review from jonpryor June 28, 2022 21:03
@jonpryor jonpryor merged commit 265ad76 into dotnet:main Jun 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants