summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2006-06-03 07:27:25 +0000
committerrillig <rillig>2006-06-03 07:27:25 +0000
commit015c41cc40bce5e39a308681859969dc0aec9a29 (patch)
tree70fc6e6dd7a3df59de946cd6f780aa7f77cf0a0e /pkgtools
parent1e9499494c0e4e7ed8583748ed0657ae05e754ca (diff)
downloadpkgsrc-015c41cc40bce5e39a308681859969dc0aec9a29.tar.gz
Added an explanation for the warning that "Each sed command should
appear in an assignment of its own", since it had been misunderstood at least once. Also, since the explanation is usually several lines long, it does not hurt to add two extra empty lines to separate the explanation from the actual warning.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 0977773a5eb..ddcdd6d626b 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.600 2006/06/03 07:06:23 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.601 2006/06/03 07:27:25 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -279,7 +279,7 @@ sub explain($$@) {
my $out = ($loglevel == LL_FATAL) ? *STDERR : *STDOUT;
if ($explain_flag) {
- foreach my $text (@texts) {
+ foreach my $text ("", @texts, "") {
print $out ("\t${text}\n");
}
}
@@ -3950,6 +3950,14 @@ sub checkline_mk_vartype_basic($$$$$$$) {
$ncommands++;
if ($ncommands > 1) {
$line->log_warning("Each sed command should appear in an assignment of its own.");
+ $line->explain_warning(
+ "For example, instead of",
+ " SUBST_SED.foo+= -e s,command1,, -e s,command2,,",
+ "use",
+ " SUBST_SED.foo+= -e s,command1,,",
+ " SUBST_SED.foo+= -e s,command2,,",
+ "",
+ "This way, short sed commands cannot be hidden at the end of a line.");
}
checkline_mk_shellword($line, $word, true);
} else {