Ignore testRunLegacyHooks in findHooks.php
authorKunal Mehta <legoktm@gmail.com>
Thu, 12 Dec 2013 20:54:46 +0000 (12:54 -0800)
committerKunal Mehta <legoktm@gmail.com>
Sat, 14 Dec 2013 04:56:02 +0000 (20:56 -0800)
Not a real hook, just used for testing.

Change-Id: I8944deb63f5f9926342aaee7cf8f990cfb7c5eb3

maintenance/findHooks.php

index 52056ea..6892096 100644 (file)
@@ -42,6 +42,11 @@ require_once __DIR__ . '/Maintenance.php';
  * @ingroup Maintenance
  */
 class FindHooks extends Maintenance {
+       /*
+        * Hooks that are ignored
+        */
+       protected static $ignore = array( 'testRunLegacyHooks' );
+
        public function __construct() {
                parent::__construct();
                $this->mDescription = 'Find hooks that are undocumented, missing, or just plain wrong';
@@ -240,8 +245,11 @@ class FindHooks extends Maintenance {
                if ( $sort ) {
                        asort( $arr );
                }
+
                foreach ( $arr as $v ) {
-                       $this->output( "$msg: $v\n" );
+                       if ( !in_array( $v, self::$ignore ) ) {
+                               $this->output( "$msg: $v\n" );
+                       }
                }
        }
 }