Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 May 2009 at 23:20 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
agentrickardTag.
Comment #2
eclipsegc commentedCan't say this bothers me one way or another, but the patch looks good, and I appreciate anyone trying to make our coding standards better.
Eclipse
Comment #3
stella commentedLooks good to me, +1
Comment #4
catchWorks for me too. Will be hard to re-learn but not a reason to leave as is.
Comment #5
Crell commentedDoes this actually match the recommended verb structure for the rest of are docblocks? There are some verbage standards that require a noun phrase and others that require a verb phrase. I don't actually know what our standard is, if any.
Comment #6
agentrickardYes.
http://drupal.org/node/1354 -- Documenting Functions.
The standard for documenting hook implementations (right below) contradicts this verb rule.
Comment #7
stella commentedComment #9
stella commentedPatch re-roll
Comment #10
damien tournoud commentedLet's do this ;)
Comment #11
dries commentedCommitted to CVS HEAD. Thanks!
Comment #12
webchickLet's get this documented in the coding standards, please!
Comment #13
stella commentedDocs updated at http://drupal.org/node/1354
Comment #14
stella commentedComment #15
jhodgdonI think the standard mentioned in #6 is wrong, and filed a separate issue on this -- see #487802: Function doc standard for Drupal is non-standard in industry
Comment #16
agentrickardAgreed. But this patch is still better than before. So this stays 'fixed.'
Comment #17
sunSorry, but this was plain wrong.
sounds like and actually is a command.
does not work as a verb turned into a noun. At least not in this context.
is an exception to our documentation standards, because it does not document or summarize the function. It is rather a human-readable equivalent of
@ingroup hook_implementations.If we want to remove this exception and adhere to the current documentation standards, the proper change is to appropriately convert all those summaries into summaries that document the actual function body.
That would mean:
becomes
Please revert this patch. And do it properly (if at all).
Comment #18
agentrickardNo.
Comment #19
catchI don't think we can do meaningful one line summaries for a lot of hooks - menu block_$op form_alter etc. Not to mention that'd break grepping for hook implementations.
Comment #20
agentrickardMy point is that rolling this back doesn't improve anything. If you want one-line summaries, that is a separate issue.
Comment #21
jhodgdonSun (#17 above): Please check out and comment on #487802: Function doc standard for Drupal is non-standard in industry. Would love some support there!
Comment #22
sunThe point is that rolling this back reverts to something that makes sense when reading it.
"Implement hook_foo()." sounds like a todo. A reminder to implement hook_foo().
Comment #23
jhodgdonSun: I totally agree with you. If we can get agreement on #487802: Function doc standard for Drupal is non-standard in industry, then my plan is at least to change them to "implements", and fix the other 2nd-person doc headers (they are all over the code). At the moment, however, our doc style guidelines say that 2nd person is the standard. It is not a good standard, in my opinion, but "Implement hook_foo()" is in compliance with the standard. Hence issue 487802. Please comment there...
Comment #24
Crell commentedComment #25
sunComment #26
Crell commented