Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 477097

Summary: [html] [validator] Forward parse error from the HTML AST manager
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Carolyn_MacLeod, curtis.windatt.public
Version: 10.0   
Target Milestone: 14.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2015-09-10 14:25:17 EDT
While waiting on bug 476910, we shuld at least implement the validator API for HTML and forward parse errors back to he user.
Comment 1 Carolyn MacLeod CLA 2015-09-10 14:29:55 EDT
When you say "validator", do you mean the w3c validators?
http://www.w3.org/developers/tools
(The one I care most about is the Nu validator because it checks some accessibility attributes).

Here's the w3c validator API doc on github:
http://validator.github.io/validator/
Comment 2 Curtis Windatt CLA 2015-09-10 15:26:25 EDT
(In reply to Carolyn MacLeod from comment #1)
> When you say "validator", do you mean the w3c validators?

We are referencing the validator API built into the Orion editor:
https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.validator

Plug-ins can analyze the editor content and return problems which will be displayed as annotations.  We use a parser to analyze the HTML contents already, so this bug is suggesting we forward any errors the parsing produces to the validator API.

We can build in additional validation, but I think it makes sense to follow up with htmllint rather than writing it ourselves.

To use something like the Nu validator it would have to be built into a JS library and be under licensing we can consume.  An alternative would be to forward the editor contents to a third party tool (maybe an option under the tools menu).  I don't believe there are any examples of this in the Orion client but there were plug-ins to demo the concept.
Comment 3 Michael Rennie CLA 2017-01-05 15:38:30 EST
Fixed in:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=eae3bafca387f50a97b084781105d133f04675e9

It should be noted its pretty much impossible to get the parser to pass along a parse error, since it is super tolerant.