pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Found two instances of explain(...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b2ac65e88d5e
branches:  trunk
changeset: 512797:b2ac65e88d5e
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon May 15 21:37:04 2006 +0000

description:
Found two instances of explain() that had not been converted properly.
Fixed them. Added explain_note().

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r edbe23859e76 -r b2ac65e88d5e pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon May 15 21:35:40 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon May 15 21:37:04 2006 +0000
@@ -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 @@
        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 @@
        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 @@
 
                                } 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 @@
 
        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;



Home | Main Index | Thread Index | Old Index