pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc/files lintpkgsrc: recognize commen...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d91a1ae7f8d0
branches:  trunk
changeset: 382970:d91a1ae7f8d0
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Aug 09 21:01:49 2022 +0000

description:
lintpkgsrc: recognize comments and shell commands in makefile lines

diffstat:

 pkgtools/lintpkgsrc/files/lintpkgsrc.pl |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r ca1d224df663 -r d91a1ae7f8d0 pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Tue Aug 09 20:51:45 2022 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Tue Aug 09 21:01:49 2022 +0000
@@ -1,6 +1,6 @@
 #!@PERL5@
 
-# $NetBSD: lintpkgsrc.pl,v 1.66 2022/08/09 20:51:45 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.67 2022/08/09 21:01:49 rillig Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -661,6 +661,9 @@
                } elsif (m#^[ ]* ([-\w\.]+) \s* ([:+?]?=) \s* (.*)#x) {
                        parse_makefile_line_var($1, $2, $3, \%vars);
 
+               } elsif ($_ eq '' || m#^\s*\## || m#^\t#) {
+                       # Skip comment lines and shell commands.
+
                } else {
                        debug("$file: unknown line '$_'\n");
                }



Home | Main Index | Thread Index | Old Index