i've been using code-style.pl to go over contrib modules and clean them up.

the version in HEAD throws "missing space before '{'" when ${$variable} is used.
This is needed for some situations, and is not really what that regex is looking for.

So, here's a patch against HEAD.

-  if (/[^ ]{/ && $program) {
+  if (/[^ |\$]{/ && $program) {
     $msg = "missing space before '{'";
   }
CommentFileSizeAuthor
code-style.pl__0.patch340 bytesShiny
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Looks OK but I'm thinking that a small code comment would help. Having to untangle regex with code comments can be daunting. ;-)

keith.smith’s picture

Title: patch for code-style.pl - allow ${$variable} systax » patch for code-style.pl - allow ${$variable} syntax
catch’s picture

Still applies if you specify the file. Is code-style.pl still used? Superceded by coder.module?

dpearcefl’s picture

Status: Needs review » Postponed (maintainer needs more info)

Is this still a problem in current D6?

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Needs work

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.