[Fusionforge-commits] r11865 - trunk/src/utils

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Dec 21 10:01:47 CET 2010


Author: lolando
Date: 2010-12-21 10:01:47 +0100 (Tue, 21 Dec 2010)
New Revision: 11865

Modified:
   trunk/src/utils/apply-coding-style.sh
Log:
Fixed 'else' problem

Modified: trunk/src/utils/apply-coding-style.sh
===================================================================
--- trunk/src/utils/apply-coding-style.sh	2010-12-21 08:54:49 UTC (rev 11864)
+++ trunk/src/utils/apply-coding-style.sh	2010-12-21 09:01:47 UTC (rev 11865)
@@ -1,13 +1,12 @@
 #! /bin/sh
 
 # EXPERIMENTAL script to enforce coding style guidelines
-# There are still things to fix (including the removal of too many newlines)
+# There are still things to fix
 # DO NOT APPLY BLINDLY!
 
 # Things to fix:
 # * long lines (such as appear with long lists of parameters to functions) are unwrapped
-#   even when they were split across several lines previously
-# * "} else {" is turned into "}\nelse {"
+#   even when they were previously split across several lines
 
 set -e
 
@@ -61,6 +60,17 @@
          } else {
              $this->oBeaut->add($sTag);
          }
+--- a/Beautifier/Filter/IndentStyles.filter.php
++++ b/Beautifier/Filter/IndentStyles.filter.php
+@@ -265,7 +265,7 @@ class PHP_Beautifier_Filter_IndentStyles extends PHP_Beautifier_Filter
+     {
+         if ($this->oBeaut->getPreviousTokenContent() == '}') {
+             $this->oBeaut->removeWhitespace();
+-            $this->oBeaut->addNewLineIndent();
++            $this->oBeaut->add(' ');
+             $this->oBeaut->add(trim($sTag));
+             if (!$this->oBeaut->isNextTokenContent('{')) {
+                     $this->oBeaut->add(' ');
 EOF
 fi
 




More information about the Fusionforge-commits mailing list