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

Javadoc validation does not take into account implied end tags #1858

Closed
laeubi opened this issue Jan 12, 2024 · 4 comments
Closed

Javadoc validation does not take into account implied end tags #1858

laeubi opened this issue Jan 12, 2024 · 4 comments

Comments

@laeubi
Copy link
Contributor

laeubi commented Jan 12, 2024

See this from the spec:

https://html.spec.whatwg.org/multipage/parsing.html#closing-elements-that-have-implied-end-tags

https://github.com/eclipse-equinox/equinox/blob/392063733c664ef504c8c46006633df98955a463/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java#L24-L34

the <p> tag is implicitly closed, but JDT does not complain but javadoc does when it sees another closing tag:

14:38:53  [ERROR] org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java:33: error: unexpected end tag: </p>
14:38:53  [ERROR]  * </p>
14:38:53  [ERROR]    ^

this currently make it quite hard to spot errors like this ones:

@laeubi
Copy link
Contributor Author

laeubi commented Jan 12, 2024

It also not seem to notice if a tag is not closed at all like here

https://github.com/eclipse-platform/eclipse.platform.swt/blob/39389a24f0bcd29a3322b6337d095f01b1d85c09/bundles/org.eclipse.swt/Eclipse%20SWT/win32/org/eclipse/swt/internal/BidiUtil.java#L84-L95

Javadoc complains:

14:38:53 eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java:434: warning: empty <p> tag
14:38:53   * <p>
14:38:53     ^

@jukzi
Copy link
Contributor

jukzi commented Sep 4, 2024

jdt does not have complete javadoc validation. if you want to propose a PR ... welcome.

@stephan-herrmann
Copy link
Contributor

jdt does not have complete javadoc validation. if you want to propose a PR ... welcome.

more specifically: jdt validates (supposedly) all that is specific to javadoc, but it does not and probably should not validate HTML (nor markdown for that matter). IMHO, that would be a good task for an additional plugin.

@stephan-herrmann
Copy link
Contributor

I don't see anyone planning to work on HTML validation in JDT

@stephan-herrmann stephan-herrmann closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
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

No branches or pull requests

3 participants