? poundtheme.patch
? coder_review/poundtheme.patch
Index: coder_review/includes/coder_review_7x.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/coder_review/includes/coder_review_7x.inc,v
retrieving revision 1.46
diff -u -p -r1.46 coder_review_7x.inc
--- coder_review/includes/coder_review_7x.inc	18 Oct 2009 23:50:44 -0000	1.46
+++ coder_review/includes/coder_review_7x.inc	24 Oct 2009 11:57:12 -0000
@@ -577,6 +577,12 @@ function coder_review_7x_reviews() {
 
     // Form API
       // http://drupal.org/node/224333#poundtheme --- #theme recommended for specifying theme function
+      array(
+        '#type' => 'regex',
+        '#source' => 'allphp',
+        '#value' => '[\'"]#markup[\'"]\s=>\stheme\(',
+        '#warning_callback' => '_coder_review_7x_poundtheme_warning',
+      ),
 
       // http://drupal.org/node/224333#node_form
       array(
@@ -1913,6 +1919,13 @@ function _coder_review_7x_schema_html_wa
   );
 }
 
+function _coder_review_7x_poundtheme_warning() {
+  return array(
+    '#warning' => t('Renderable elements should be using assiciated theme functions to the #theme key instead of themed #markup value.'),
+    '#link' => 'http://drupal.org/node/224333#poundtheme',
+  );
+}
+
 function _coder_review_7x_node_form_warning() {
   return array(
     '#warning' => t('Easier check for node form during !hook_form_alter().',
Index: coder_review/tests/coder_review_7x.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/coder_review/tests/coder_review_7x.test,v
retrieving revision 1.40
diff -u -p -r1.40 coder_review_7x.test
--- coder_review/tests/coder_review_7x.test	18 Oct 2009 23:50:44 -0000	1.40
+++ coder_review/tests/coder_review_7x.test	24 Oct 2009 11:57:12 -0000
@@ -422,6 +422,7 @@ class CoderReviewUpgrade7xTest extends C
 
   function testForm7x() {
     // http://drupal.org/node/224333#poundtheme
+    $this->assertCoderReviewFail("  '#markup' => theme('image', 'http://foo.com/test.jpg', NULL, t('A title'), array('class' => 'external-image'), FALSE),");
 
     // http://drupal.org/node/224333#node_form
     $this->assertCoderReviewFail("  function mymodule_form_alter(&\$form, &\$form_state, \$form_id) {\n  if (isset(\$form['type']) && isset(\$form['#node']) && \$form['type']['#value'] .'_node_form' == \$form_id)");
