After we resolve Bug 31875 lets add the W3C validator for all builds http://validator.w3.org/mobile/
(In reply to comment #0)
After we resolve Bug 31875 lets add the W3C validator for all builds
Is there some sort of an API for this data? So we don't have to paste and scrape the output...
Not sure how we'd actually go about doing this
The HTML code now validates as of https://gerrit.wikimedia.org/r/3801 and https://gerrit.wikimedia.org/r/3802
It could still do with an automation step though.
I should say the HTML code validates until you introduce wikitext :D - since wikitext can contain any html markup this leads to lots of validation errors on various pages.
Note sure what implementation you have in mind, but perhaps it makes sense to do this as a PHPUnit test? Generate the html, pass it over to the api using MediaWiki's Http methods and assert based on the W3 API repsonse.
Krinkle - exactly what I had in mind :-)
What if the user running phpunit does not have an internet connection? Should the tests still fail or should a warning be printed instead?
PHPUnit has various alternative modes for assertions (next to Passed and Failing). Such as "Incomplete", "Skipped" and "Broken" (which are all effectively the same as "Skipped").
We could also run the validator ourselves I guess, not to depend on any 3rd party. They're open source:
We just ran into a bug today (unclosed div) which could have been easily trapped if we had this.
Assigned Mingle Ticket https://mingle.corp.wikimedia.org/projects/mobile/cards/696
Related URL: https://gerrit.wikimedia.org/r/61775 (Gerrit Change I1414e2fbc71b090e07d4a1073ee3b6f3159f3759)
This has been bothering me for some time. I knocked up a shell script. In future we might want to run it as part of a pre-commit hook when template files change.
Code merged, marking resolved.
https://gerrit.wikimedia.org/r/61775 (Gerrit Change I1414e2fbc71b090e07d4a1073ee3b6f3159f3759) | change APPROVED and MERGED [by jenkins-bot]