How to create hook for altering every node form? I tried:

mymodule_form_node_alter
mymodule_form_node_form_alter

and global hook:
function mymodule_form_alter(&amp;$form, $form_state, $form_id) {
  if ($form['#id'] == 'node-form') {
      #set message
  }
}

None from above works for me.
I need to create hook that invokes on every node form. if it possible.
/**
 * Implements hook_form_BASE_FORM_ID_alter().
 */
function MYMODULE_form_node_form_alter(&amp;$form, &amp;$form_state) {
  // Do stuff.
}

It could be that it didn't work because you have to clear the cache after adding the hook.