diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-17 15:44:21 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-17 15:44:21 +0000 |
commit | ac50e1a46f6ee908cbef6bd2373be3389cd56048 (patch) | |
tree | 019f4ebaeba541ffe96590518fa16af14f6740f7 /scripts | |
parent | 0db3df1bfa32fa8f7ddf071339c3d0ffd10cf4cc (diff) | |
download | brdo-ac50e1a46f6ee908cbef6bd2373be3389cd56048.tar.gz brdo-ac50e1a46f6ee908cbef6bd2373be3389cd56048.tar.bz2 |
code-style.pl
- allow $var++ and $var-- syntax.
update.php / block.module
- cleaned up coding style, and trailing spaces.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/code-style.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/code-style.pl b/scripts/code-style.pl index 4e74f12f0..50d700543 100644 --- a/scripts/code-style.pl +++ b/scripts/code-style.pl @@ -121,11 +121,14 @@ while (<>) { $msg = "missing space before '{'"; } # there should be a space after ',' - elsif (/[,][^ ]/ && $program) { + elsif (/[,][^ \n\r]/ && $program) { $msg = "missing space after ','"; } # spaces before and after, only foreach may use $foo=>bar - elsif (/[^ =](\+|\-|\*|==|\.=|=>|=|\|\|)[^ =>]/ && $program && !/foreach/) { + elsif (/[^ =|-|\+](\+|\-)[^ =>|-|\+]/ && $program && !/foreach/) { + $msg = "'$1' -> ' $1 '"; + } + elsif (/[^ =](\*|==|\.=|=>|=|\|\|)[^ =>]/ && $program && !/foreach/) { $msg = "'$1' -> ' $1 '"; } # ensure $bar["foo"] and $bar[$foo] and $bar[0] |