I have reviewed the API docs in Drush quickly and found a few discrepancies. I fix those and add more documentation in the attached patch.

CommentFileSizeAuthor
#2 api.patch3.76 KBanarcat
api.patch3.52 KBanarcat

Comments

moshe weitzman’s picture

Status: Needs review » Needs work

Thanks for polishing these. I disagree the lowercasing such as

-function hook_COMMAND_validate() {
+function drush_hook_command_validate() {

The uppercase signals to the reader that this is variable text and the proper command name should be substituted. Drupal7 uses the same convention. See http://api.drupal.org/api/function/hook_form_FORM_ID_alter/7

anarcat’s picture

Status: Needs work » Needs review
StatusFileSize
new3.76 KB

Alright, here's a reroll. That also fixes some issues with the @file help that i noticed.

moshe weitzman’s picture

Much better ... I do not understand the example "So if, for example, the
+ * drush_post_hook() call fails, the following hooks will be called:"

Caqn we use a real world command like dl or updatedb?

moshe weitzman’s picture

Status: Needs review » Fixed

I added more clear examples and committed. thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.