'regex', '#source' => 'php', '#value' => '\s*(? 'print_r\s*\([^,]+,\s*true\s*\)', '#warning' => 'Remove PHP debugging function calls.', ), // Debugging calls provided by devel // Be sure to skip function definitions array( '#type' => 'regex', '#source' => 'php', '#value' => '\s*(?:\S+\s*)?(?:dargs|dpm|dpr|dprint_r|db_queryd|dsm|dvm|dvr)\s*\([^\)]+\)', '#not' => 'function.*|(?:(?:dpr|dprint_r)\s*\([^,]+,\s*true)', '#warning' => 'Remove devel.module debugging function calls.', ), // Check for code in comments that should be removed array( '#type' => 'regex', '#source' => 'comment', '#value' => '.*(?:\(|\);|\{|\})\s*$', '#not' => '[^@]@(?:\{|see).*', '#warning' => 'Comments containing code should be removed for releases.', ) ); $review = array( '#title' => t('Release standards'), '#rules' => $rules, '#link' => 'http://www.yahoo.com/', '#description' => t('Prepare modules for production by removing debugging function calls.'), ); return array('release' => $review); }