Index: includes/coder_style.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/includes/coder_style.inc,v
retrieving revision 1.16.2.7
diff -u -r1.16.2.7 coder_style.inc
--- includes/coder_style.inc 9 Jan 2008 13:31:12 -0000 1.16.2.7
+++ includes/coder_style.inc 30 Jan 2008 10:21:42 -0000
@@ -118,6 +118,17 @@
       '#warning' => 'use quotes around a string literal array index, this is not only a style issue, but a known performance problem',
       '#case-sensitive' => TRUE,
     ),
+    array(
+      '#type' => 'regex',
+      '#value' => '\s(if|elseif|while|foreach|switch|return|for|catch)\s*\(.*\)\s*{\s*[^\s]+',
+      '#warning' => 'control structures should not be all on one line',
+    ),
+    array(
+      '#type' => 'regex',
+      '#source' => 'all',
+      '#value' => '\s+$',
+      '#warning' => 'There should be no trailing spaces',
+    ),
   );
   $review = array(
     '#title' => t('Drupal Coding Standards'),
Index: tests/coder_style.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/tests/coder_style.inc,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 coder_style.inc
--- tests/coder_style.inc 9 Jan 2008 13:31:12 -0000 1.6.2.3
+++ tests/coder_style.inc 30 Jan 2008 10:21:42 -0000
@@ -80,5 +80,22 @@
   $a['hello'] = 'this is no';
 }

+function coder_trailing_spaces() {
+  $left = 'this is bad';
+  $left = 'this is ok';
+}
+
+function coder_control_structures() {
+  if($a == 1){ }
+  if ($a == 1) {
+  }else {
+  }
+  if ($a == 1) { $b = 2;
+  }
+  if ($a == 1) {$b = 2;
+  }
+}
+
+
 // Should generate an error about the trailing php close.
 ?>