Google Summer of Code 2017 - mdn/doc-linter-webextension GitHub Wiki
This project has been started thanks to Google and the Google Summer of Code 2017 initiative.
Abstract
The MDN content team has used a browser add-on to check the syntax and proper standards compliance of MDN wiki documents for quite a long time now.
With the WebExtension initiative and the deprecation of the old XUL SDK at Mozilla, it was necessary to port the XUL based add-on to the new WebExtensions APIs.
Sprint breakdwon
To maximize our chance of success, we decided to break down the problem piece by piece and establish a critical path with the requirements needed to match feature equivalence.
- Task 1: Setup the GitHub repositories and Continuous Integrations tools.
- Task 2: Port the current XUL based add-on to use the WebExtensions APIs.
- Task 3: Triage and progress through all the bugs from the XUL based add-on.
- Milestone 1: Release a first beta version of the WebExtension.
- Task 4: Fix the bugs found during the beta testing phase.
- Task 5a: Either add the support for the DevTools APIs in top of the sidebar for incompatible browser such as Chrome or
- Task 5b: separate the linting logic from the WebExtensions to allow future usage in other contexts.
- Task 6: Ask for feature requests and implement those we feel logical and fitting the timeframe.
- Task 7: Add the localization file to Pontoon the platform used by Mozilla for the localization of its various projects.
This is what should have happened in theory.
In practice, we choose quickly decided whether it will be task 5a or task 5b. We choose to separate the linting logic from the extension and we consequently choose to implement the fifth task before the first milestone.
We also decided to not go forward with the seventh task due to changes to the MDN localization infrastructure happening at the same time as GSOC.
We also did a second release before the end of the program. This was possible thanks to the testing community which found minor bugs in the first release.
Sprint results
Except for the seventh task that we decided to delay for after the GSoC, we managed to accomplish all tasks.
Regarding the sixth task, we managed to implement the following feature requests:
- On the linting logic
- Implement a rule to return an error on
pre
element withclass=eval
. (https://github.com/mdn/doc-linter-rules/issues/26) - Implement a rule to return an error on mixed-content. (https://github.com/mdn/doc-linter-rules/issues/20)
- Implement a rule to ensure that each internal links match a proper anchor. (https://github.com/mdn/doc-linter-rules/issues/18)
- Implement a rule that inform regarding the number of links on a document for SEO purposes (https://github.com/mdn/doc-linter-rules/issues/3)
- Implement a rule to return an error on
- On the browser extension
- Sort the results by order of importance (https://github.com/mdn/doc-linter-webextension/issues/5).
- Run the test suite also in CKEditor source mode (https://github.com/mdn/doc-linter-webextension/issues/22).
We still have a few pending feature request on which we will be working on the future (after GSoC).
The code
The code is divided into two repositories, one for the linting logic and one for the WebExtension.
On both of those repositories the work covered by Google Summer of Code starts at the first commit and ends with these commit hashes:
- Documentation Linter WebExtension: 50c54bfbd520671c0390ed16ccafa36a67a62f73
- Documentation Linter Rules: 2b7bb99cfd41a71d2c08f6f63f38f300774f31fb
All the work done after these commits is done as part of further contribution to the Mozilla community.
Questions and further information
If you would like to get more informations regarding this project feel free to come ask on irc.mozilla.org/#mdn and ping anthony
or fscholz
Thanks to
All of this would not have been possible without the support from a lot of people but especially:
- Google for the Google Summer of Code program.
- Florian Scholz, my mentor in this project. I learned so much with him and he took so much time for me.
- Jeremie Patonnier and Jean-Yves Perrier, without you I never would have tried this and I would have missed so much.
- Julien aka Sphinx, for all the beta-testing you did for me.
- All members of the MDN team inlcuding Sebastian Zartner for all the help, the advice, the support you provided me with.
- All members of the MercrediDoc community, for beta-testing the beta-test version of the extension.
- All of the Mozilla community to be such an awesome community :-)