Task description
This task is to ensure that all functions, classes, methods, and constants in the Code Review and Lightbox V2 modules have properly formed, complete Doxygen code comments.
Doxygen is the documentation generation system that Drupal uses. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code. The documentation should contain information that is helpful to developers who may not be familiar with the code, such as explaining what functions do, how functions should be called and what information the different parameters contain. Developers often need need to check the API documentation when creating patches or developing new features and so it is important to have clear, correct documentation.
To complete this task, review the twomodules and add API documentation to any function, class, method, or constant that does not have it or expand on existing documentation where it is incomplete, unclear, or does not follow established Drupal standards. See the resources section for more information, particularly the "Drupal Doxygen formatting conventions".
The final deliverable will be a set of 2 patches against the 6.x versions of the Code Review and Lightbox V2 modules posted to the issue queue that has been reviewed and marked "Ready to be Committed".
Resources
- Drupal Doxygen formatting conventions - http://drupal.org/node/1354
- Drupal Coding Standards - http://drupal.org/coding-standards
- http://www.stack.nl/~dimitri/doxygen/docblocks.html
- http://www.stack.nl/~dimitri/doxygen/commands.html
- Code Review project page - http://drupal.org/project/coder
- Lightbox V2 project page - http://drupal.org/project/lightbox2
Primary contact
Stella Power (http://drupal.org/user/66894 - snpower)
Cheers,
Stella
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | coder_200880_5xmodule.patch | 30.64 KB | stella |
| #22 | coder_200880_6xmodule.patch | 1.19 KB | stella |
| #19 | 200880.patch | 82.74 KB | douggreen |
| #16 | coder-docs7.patch | 80.56 KB | ezyang |
| #16 | lightbox2-docs3.patch | 9 KB | ezyang |
Comments
Comment #1
stella commentedComment #2
stella commentedThis is a GHOP task. See http://code.google.com/p/google-highly-open-participation-drupal/issues/...
Comment #3
ezyang commentedThis is an initial, incomplete patch, following the RERO principal: release early, release often. I'd like to get the nits out of my documenting style so that the rest of what I do is done properly.
Comment #4
ezyang commentedAssigning to self.
Comment #5
stella commentedHi,
First off, thanks for your help with this! Review feedback below.
From looking at the examples and descriptions on Doxygen formatting conventions, I've noted the following:
@param $settings, and not@param array $settings.Build the form array for coder settings.. However, I think the description needs to be altered a bit to make it clearer what the form is for.I also have a couple of questions about the content of some of the comments. Perhaps you could explain what they mean:
Finally in your patch for coder.module, you have:
The difference between the two lines is that you've added an extra space before the equals sign. Neither version breaks the coding standards, but I would ask that you limit your changes to just the documentation so it's easier to review (unless you do actually find a bug!).
Oh I'd also like to point out that documenting the "warning" functions in the coder/includes/ files is unnecessary and it's also not required to document the functions in the coder/tests/ files either. However, you do have to document the files themselves and all non-warning functions in the includes files.
Good luck with the rest. Looking forward to reviewing your work. Oh, and if you have any questions, don't hesitate to ask. I'm also on the #drupal-ghop IRC channel a fair bit.
Cheers,
Stella
Comment #6
ezyang commentedUpdated, with all of your concerns fixed, and all of Coder done! I noticed some bugs (namely, the antiquated form handling code), but they'd require some fairly major changes, so I'll fix them after this patch gets committed.
I noticed a few peculiarities:
Comment #7
ezyang commentedEven though Lightbox V2 hasn't been done, this needs review.
Comment #8
stella commentedHeya,
Ummm I didn't spot this earlier, but is this a patch against Drupal 5 or 6 versions of the module. The task did say Drupal 6.x, but if you've gone ahead and done all of this for 5.x and are doing the same for lightbox2, then we'll just stick with 5.x then.
Other notes:
coder_6x_reviews()and_coder_6x_callback().I'll get back to you when I've finished reviewing the contents of the comments themselves. Thanks!
Cheers,
Stella
Comment #9
ezyang commentedUpdated patch! The doc changes merge cleanly into 6.x, so I switched my branch there. My apologies; I forgot to set the branch when I checked out the code. There are no "content" changes (besides the added blocks), so a review of the old patch is still ok.
Comment #10
ezyang commentedDocs for lightbox2 6.x.
Comment #11
stella commentedCoder review
General
Tests directory
/**and there are some missing periods.Scripts directory
Includes directory
/**. There are also some missing periods.coder.module
/**.Lightbox2 review coming shortly!
Thanks,
Stella
Comment #12
stella commentedLightbox2 review
Looks pretty good!
Cheers,
Stella
Comment #13
ezyang commentedUpdated coder patch.
A few notes:
I am slightly concerned that some of the comments I changed may break the tests. The risk for that seems to be low, however. There's a bit of variety in the test files, with "Ok", "An error", "Not ok" and perhaps a dozen other possibilities; I normalized a few, left the rest, not sure what to do.
I believe this is a bug in the code. I checked the file history and I am definitely using the latest version.
I will have to politely disagree. Any user inspecting the source code will be jumping around functions anyway (in order to see how one execution flows to the next), and by not duplicating this information the developer's job is made much easier when it comes time to update the comments ("Oh no, where is this information duplicated?!") It would be even better if Drupal's API documents also applied to modules; then these function names would be converted to easy links.
Done. I will submit the appropriate issues.
Updates for lightbox2 coming shortly.
Comment #14
ezyang commentedUpdated lightbox2 patch.
Comment #15
stella commentedHi,
Those look great! Thanks for all your hard work.
There's only one minor problem left and affects both patches. It's not a biggie, but may affect the API parsing of the files, not sure. According to Doxygen formatting conventions, the @file directive should be on the line after the opening
/**and the file description should be on the following line, for example:I think you have a blank line between the @file and the one-line summary description in the majority of cases. If you fix that for each fiel and attach the updated the patches, then this can be marked ready to commit. :)
Thanks again.
Cheers,
Stella
Comment #16
ezyang commentedFinal patches!
Comment #17
add1sun commentedFixed snpower's last comment and it looks good to me.
Comment #18
stella commentedThanks ezyang, that's perfect. I've applied the lightbox2 patch and checked it into CVS. Assigning this task to the coder module until it also gets committed.
Thanks again, and good luck with the rest of your GHOP tasks.
Cheers,
Stella
Comment #19
douggreen commentedThanks, that was a lot of work!
I've changed some of the comments as follows:
I'm attaching the patch here, for documentation purposes. I tested against 6.x core and against the tests directory, to confirm that the results were the same before and after this patch (although I just looked at the summary numbers, and not the actual warnings). I committed this to the 6.x branch. I tried to apply it to the 5.x branch, but there were a few discrepancies, so I didn't commit it. I then tried to copy the tests and includes from 6.x, to keep those in sync, but there were also some discrepancies there.
We still need to sync up the tests and includes directories, so while I've committed the 6.x code, I'm leaving this as CNW.
Comment #20
stella commentedThe tests files look like they should be transferable without any problems. Will check the includes files tomorrow.
Comment #21
stella commentedI've compared both the 6.x tests and includes files with that of 5.x, and also used the new 6.x versions of these files on my 5.x test site and couldn't find any problems. I compared the warnings line by line too to be sure! What discrepancies did you find Doug?
I'm now going to look at providing a 5.x patch of the module file based on ezyang's work.
Cheers,
Stella
Comment #22
stella commentedAttached are two patches for the coder.module file. One is for the 6.x version - just fixes a couple of commenting errors, while the other is for the 5.x version and applies all the commenting changes.
Cheers,
Stella
Comment #23
douggreen commented@snpower, Thanks! Please commit these before the coder_metrics work begins.
Comment #24
stella commentedDone!
Comment #25
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.