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:50:44
Branch: HEAD Handle: 2003070712504400
Modified files:
openpkg-re speclint.pl
Log:
check for deprecated usage of %{name} macro
Summary:
Revision Changes Path
1.28 +19 -0 openpkg-re/speclint.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/speclint.pl
============================================================================
$ cvs diff -u -r1.27 -r1.28 speclint.pl
--- openpkg-re/speclint.pl 7 Jul 2003 11:42:21 -0000 1.27
+++ openpkg-re/speclint.pl 7 Jul 2003 11:50:44 -0000 1.28
@@ -104,6 +104,7 @@
section
preproc
script
+ global
));
my @checks = ();
if ($check eq 'all') {
@@ -770,5 +771,23 @@
}
# TODO: parenthesis style for sub-shells
+}
+
+## _________________________________________________________________
+##
+## CHECK "global": globals
+## _________________________________________________________________
+##
+
+sub check_global {
+ my ($file, $spec) = @_;
+
+ my $done = ''; my $this = ''; my $todo = $spec;
+ while ($todo =~ m/\%\{name\}/s) {
+ $done .= $`; $this = $&; $todo = $';
+ my ($section, $args, $script) = ($1, $2, $3);
+ &lint_warning($file, $done, $this, "deprecated usage of %{name} macro
(expected none)");
+ $done .= $this;
+ }
}
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]