I probably am doing this wrong but i notice that when modules have set their hook examples as
HOOK_function_name ... mb doesn't successfully process.

Here's an example.

Our friendly neighborhood apachesolr.module has a file apachesolr.api.php with a function:

function HOOK_apachesolr_query_prepare($query) {
  // Add a sort on the node ID.
  $query->setAvailableSort('entity_id', array(
    'title' => t('Node ID'),
    'default' => 'asc',
  ));
}

I do a

drush mb sinai_solr apachesolr_query_prepare --write --name="Sinai Solr Custom Overrides" --dep="apachesolr facetapi"

and I get an empty sinai_solr.module

CommentFileSizeAuthor
#5 1204480.patch3.15 KBnick_vh

Comments

joachim’s picture

Status: Active » Closed (won't fix)

That's a bug in the respective module, not here.

We could probably stick a case-insensitive modifier in the regexp here, but really .api.php files should follow core's formatting rules.

joachim’s picture

Status: Closed (won't fix) » Closed (works as designed)

Better status.

chriscalip’s picture

Project: Module Builder » Apache Solr Search
Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Closed (works as designed) » Active
chriscalip’s picture

Title: Modules that do HOOK_ instead of hook_ » Please update apachesolr.api.php naming convention from HOOK_ to hook_
nick_vh’s picture

Status: Active » Needs review
StatusFileSize
new3.15 KB

Here's the patch.

nick_vh’s picture

Status: Needs review » Fixed

Committed

Status: Fixed » Closed (fixed)

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