OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-re Date: 07-Jul-2003 13:42:22 Branch: HEAD Handle: 2003070712422100 Modified files: openpkg-re speclint.pl Log: check for indented preproc directives Summary: Revision Changes Path 1.27 +9 -0 openpkg-re/speclint.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-re/speclint.pl ============================================================================ $ cvs diff -u -r1.26 -r1.27 speclint.pl --- openpkg-re/speclint.pl 7 Jul 2003 11:31:16 -0000 1.26 +++ openpkg-re/speclint.pl 7 Jul 2003 11:42:21 -0000 1.27 @@ -567,6 +567,15 @@ while (defined($line = pop(@stack))) { &lint_error($file, undef, undef, "\%if at line $line never closed by \%endif"); } + + # check for indented preprocessor constructs + $done = ''; $this = ''; $todo = $spec; + while ($todo =~ m/^[ \t]+(%(?:if|else|endif|define|undefine|option)).*$/m) { + $done .= $`; $this = $&; $todo = $'; + my $directive = $1; + &lint_error($file, $done, $this, "found indented \"$directive\" preprocessor directive (expected no indentation)"); + $done .= $this; + } } ## _________________________________________________________________ @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]