130
edits
(Added a section about writing tests) |
(Moved the documentation section, and added a link to the devtools code review checklist) |
||
| Line 277: | Line 277: | ||
In particular, it's important to write self-explanatory comments for new keys, deleting unused keys, changing the key name when changing the meaning of a string, and more. So make sure you read through these guidelines should you have to modify a localization file in your patch. | In particular, it's important to write self-explanatory comments for new keys, deleting unused keys, changing the key name when changing the meaning of a string, and more. So make sure you read through these guidelines should you have to modify a localization file in your patch. | ||
= DevTools Automated Tests = | = DevTools Automated Tests = | ||
| Line 362: | Line 345: | ||
To help with writing nice, maintainable and consistent DevTools mochitests, please follow our [https://wiki.mozilla.org/DevTools/mochitests_coding_standards DevTools mochitests coding guide]. | To help with writing nice, maintainable and consistent DevTools mochitests, please follow our [https://wiki.mozilla.org/DevTools/mochitests_coding_standards DevTools mochitests coding guide]. | ||
= Finding documentation = | |||
If you read through the source code about something you do not know about, you may find documentation here: | |||
* [http://developer.mozilla.org/ Mozilla Developer Network] has a ton of info about XUL elements, HTML, JS, DOM, Web APIs, Gecko-specific APIs, and more. | |||
* [http://dxr.mozilla.org/mozilla-central/source/ DXR] is a source code search engine - search for symbols you want to learn about, eg. nsIDocument. | |||
* There's some technical [https://dxr.mozilla.org/mozilla-central/source/devtools/docs DevTools documentation in the repository] that you should check. | |||
* And other technical documents on [[DevTools#Internal_Technical_Documentation|on this wiki]] | |||
We recommend [https://support.mozilla.org/en-US/kb/how-search-from-address-bar adding a smart keyword search] for DXR and MDN. | |||
If you still have questions, [[DevTools/GetInvolved#Communication|ask us on IRC]] or leave a comment on the Bugzilla ticket. | |||
= Making and Submitting a Patch = | |||
Before you make any changes, read [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/index.html the documentation on how to use Mozilla's version control]. | |||
Before you submit a patch, you should read our [[DevTools/CodingStandards|Coding Standards]] and run [https://wiki.mozilla.org/DevTools/CodingStandards#JS_linting_with_ESLint ESLint] to validate your code changes (to avoid loosing time during code reviews with formatting details for instance). In general, try to be File Consistent. For new files, follow the standards. | |||
Once you have a patch file, add it as an attachment to the Bugzilla ticket you are working on and add the '''feedback?''' or '''review?''' flag depending on if you just want feedback and confirmation you're doing the right thing or if you think the patch is ready to land respectively. Read more about [https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch how to submit a patch and the Bugzilla review cycle here]. | |||
You can also take a look at the [[DevTools Code Review Checklist]] as it contains a list of checks that your reviewer is likely to go over when reviewing your code. | |||
= Coding Standards = | = Coding Standards = | ||
edits