In the ArgumentValidatorPluginBase class (in the Views module), the validateArgument() method has no documentation at all.
Furthermore, the rest of the methods need a little documentation help -- most of them have non-conforming first lines. Every function/method should have a first line summary that starts with a third person verb (like "Determines" not "Determine"). This first line should be followed by a blank line, then the rest of the method documentation (if any).
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | no_docs_for-2710395-15.patch | 2.34 KB | nesta_ |
| #15 | interdiff-2710395-13-15.txt | 667 bytes | nesta_ |
| #13 | no_docs_for-2710395-12.patch | 2.4 KB | joelrguezaleman |
| #13 | interdiff-2710395-11-12.txt | 1.18 KB | joelrguezaleman |
| #11 | no_docs_for-2710395-10.patch | 2.38 KB | joelrguezaleman |
Comments
Comment #2
jhodgdonThis page has some information about what argument validator plugins do, so it might be helpful for writing docs:
https://api.drupal.org/api/drupal/core!modules!views!src!Plugin!views!ar...
Given that... probably a good Novice project? I presume that the validateArgument() method is the main one that actually does the validation.
Actually, as long as we are fixing this issue, maybe we could fix up the other method documentation on this class. Every function/method should have a first line summary that starts with a third person verb (like "Determines" not "Determine"). Fixing this would not add much to the patch. Adding to issue summary and title.
Comment #3
joelrguezaleman commentedCreated patch for this issue.
I´ve added docs for the validateArgument method. Also, since I saw that some comments ended with a dot and some others didn´t, I´ve added a dot to the ones that didn´t. As for the bad first lines, after cloning the repo and checking out 8.2.x branch, I see that these are alright.
Comment #4
joelrguezaleman commentedComment #5
dimaro commentedDuplicated word? (form)
Comment #6
joelrguezaleman commentedFixed.
Comment #7
dimaro commentedChange status for run tests.
Comment #9
dimaro commentedThe latest patch does not include all changes corrected on #3.
Upload a new patch with an interdiff.
Comment #10
zerolab commentedAs @jhodgdon mentioned in #2, "Every function/method should have a first line summary that starts with a third person verb (like "Determines" not "Determine")."
Comment #11
joelrguezaleman commentedFix #10. Adding interdiff and full patch.
Comment #12
jhodgdonThanks! This is mostly great. Just a few places need attention:
The first line of a doc block needs to be a one-line description, ending in . This is two lines. I think all of it will fit in one line (<= 80 characters).
This needs to be split into two paragraphs.
The first one should start with "Ensures", and should be a 1-line description of the function.
If there is more information that needs to be said and cannot fit in one line, put in a blank line and then put the additional information into a new paragraph (perhaps into the next paragraph that is already below here?).
Comment #13
joelrguezaleman commentedFix #12.
Comment #14
jhodgdonSorry, I should have said this in the last review.
Most of the methods on this class are expected to be overridden by child classes (if appropriate). I really don't think we need this line on this one in particular. We don't normally do that in base classes.
The rest looks good, thanks!
Comment #15
nesta_ commentedTry to fix commented above on #14
Comment #16
jhodgdonThanks! Looks OK to me. Definitely an improvement over what was there (or not there) before.
Comment #17
alexpottCommitted 8ef1d38 and pushed to 8.1.x and 8.2.x. Thanks!
I'm guessing but there is probably alot more views docs to fix out there. With respect to issue scope - when changing or adding documentation doing it per class per type of documentation makes sense.