Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #415980 +++ HTML5 attribute validator marks the ng-app AngularJS attributes as undefined: Warning: Undefined attribute name (ng-app). Undefined attribute name (ng-controller). The AngularJS is well known and popular JS-tool which is widely used by HTML5 developers, so, having these warnings become more and more annoying. Why we cannot make them to be 'known' by the HTML Attribute Validator as it's done for 'x-' and 'data-' attributes? The adopter of WST Source Editing Tools requests for back porting of org.eclipse.wst.html.core changes made to fix bug #415980 into WTP 3.5.2. This includes: 1. Two new preferences added that allow to ignore specified attribute names in validation and to specify the attribute names to be ignored; 2. Preference Initializer is made to init these new preferences; 3. HTMLAttributeValidator is made to understand and use these preferences
Explain why you believe this is a stop-ship defect: * It's impossible to made HTML Attribute Validator not to mark HTML5 attribute names as unknown. Is there a work-around? If so, why do you believe the work-around is insufficient? * No, there is no way to configure the validator due not to validate some attribute names that are known for adopter's product. How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? * Tested by running org.eclipse.wst.html.core.tests and org.eclipse.wst.html.ui.tests JUnit Test Suites on R3_5_maintenance branch. All tests are passed with no errors. Also, the manual testing was performed on WTP HTML Editor and Validator. Give a brief technical overview. Who has reviewed this fix? * The fix is a back port of core part of the fix made in bug #415980. Here it adds two preferences to the HTML Core, the initialization of these two preferences and makes the HTML Attribute Validator to properly react on the value of these new preferences. These preferences specify if some tag attribute names should be excluded from the validation and allow to set up such attribute names. No UI changes are made by this fix. What is the risk associated with this fix? * Low. All JUnit Tests are good after applying the patch in R3_5_maintenance branch. Smoke testing shows that Validation and HTML Editor work well.
Created attachment 239446 [details] Patch to backport the "core" part of the fix made for bug #415980
Created attachment 239450 [details] Patch to backport the "core" part of the fix made for bug #415980
The patch looks good to me, and I can see the importance of correcting the validator as particular frameworks gain traction.
Thanks for the quick review, Raghu. I've pushed the changes the R3_5_maintenance: http://git.eclipse.org/c/sourceediting/webtools.sourceediting.git/commit/?id=f4f3fd5fd74846be7ef6ae0caa851d9b8e1e163b
Thank you for the fix!
String#isEmpty() isn't part of the 1.4 Execution Environment. Released v201401301446 to fix the compile breakage.
Ops, sorry! And thank you, Nitin!