diff options
author | rillig <rillig@pkgsrc.org> | 2006-05-15 21:37:04 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-05-15 21:37:04 +0000 |
commit | b8cb56e04eedf4a15458c8f7ab7cd14c586afcf8 (patch) | |
tree | 54f464c71623919e693bcd5bcda9d272d40f8526 /pkgtools | |
parent | 4957b713b007c64c317a18e3e15a9d0a3bbb1a23 (diff) | |
download | pkgsrc-b8cb56e04eedf4a15458c8f7ab7cd14c586afcf8.tar.gz |
Found two instances of explain() that had not been converted properly.
Fixed them. Added explain_note().
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 1ca5cadfeed..f1661778263 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.582 2006/05/15 07:20:45 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.583 2006/05/15 21:37:04 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -269,6 +269,10 @@ sub explain_warning($$@) { my ($fname, $lines, @texts) = @_; explain(LL_WARNING, $fname, $lines, @texts); } +sub explain_note($$@) { + my ($fname, $lines, @texts) = @_; + explain(LL_NOTE, $fname, $lines, @texts); +} sub explain_info($$@) { my ($fname, $lines, @texts) = @_; if ($verbosity >= 1) { @@ -558,6 +562,10 @@ sub explain_warning($@) { my ($self, @texts) = @_; PkgLint::Logging::explain_warning($self->fname, $self->[LINES], @texts); } +sub explain_note($@) { + my ($self, @texts) = @_; + PkgLint::Logging::explain_note($self->fname, $self->[LINES], @texts); +} sub explain_info($@) { my ($self, @texts) = @_; PkgLint::Logging::explain_info($self->fname, $self->[LINES], @texts); @@ -4235,7 +4243,7 @@ sub checklines_mk($) { } elsif (!exists($allowed_targets->{$target})) { $line->log_warning("Unusual target \"${target}\"."); - $line->explain( + $line->explain_warning( "If you really want to define your own targets, you can \"declare\"", "them by inserting a \".PHONY: my-target\" line before this line. This", "will tell make(1) to not interpret this target's name as a filename."); @@ -4479,8 +4487,8 @@ sub checkfile_distinfo($) { checkline_rcsid($lines->[0], ""); if (1 <= $#{$lines} && $lines->[1]->text ne "") { - $lines->[1]->log_warning("Empty line expected."); - $lines->[1]->explain("This is merely for aesthetical purposes."); + $lines->[1]->log_note("Empty line expected."); + $lines->[1]->explain_note("This is merely for aesthetical purposes."); } $current_fname = undef; |