How do I disable update checks for locked projects? I am using drush @sites cron in order to get update notifications in a Drupal 7 multisite configuration.
However, I need to have some projects locked, using drush up --lock=context_mobile_detect.

Example:

.var.vhosts.drupalmulti#example.com           &gt;&gt;  Name                     Installed Version  Proposed version  Message
.var.vhosts.drupalmulti#example.com           &gt;&gt;  Context Mobile Detect    7.x-1.3            7.x-2.0-alpha1    **Locked via drush.**
.var.vhosts.drupalmulti#example.com           &gt;&gt;  (context_mobile_detect)                                       (Installed version not
.var.vhosts.drupalmulti#example.com           &gt;&gt;                                                                supported)


Since this command checks many sites, it sends many unnecessary emails of the form: "New release(s) available for example.com", although most of the time no module needs to be updated.

Is there a way, using code or not, to disable update checking of locked projects?
drush cron will trigger the default update manager search, whereas locked project are only locked during drush pm-updatestatus. If you want to prevent Update Manager from checking for particular modules, you'll need a custom module that implements hook_update_projects_alter. All you have to do then is unset($projects['context_mobile_detect']);.

E.g.

/**
 * Implements hook_update_projects_alter().
 */
function MYMODULE_update_projects_alter(&amp;$projects) {
  unset($projects['context_mobile_detect']);
}


I do this quite a lot for Features modules, or custom code.