pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Reactivated the code to warn ab...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/92d81f663304
branches:  trunk
changeset: 537262:92d81f663304
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Jan 05 18:04:06 2008 +0000

description:
Reactivated the code to warn about missing comments in patches. It seems
that the time has come that we can no longer find out what a patch does,
unless we document it. The CVS history is not of great help in many
cases, patches get moved in the repository and so on.

To not scare casual pkglint users, these warnings are only shown if
pkglint is run with the -Wstyle or -Wall option.

diffstat:

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

diffs (42 lines):

diff -r 2a019773d51f -r 92d81f663304 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Jan 05 18:03:43 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Jan 05 18:04:06 2008 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.749 2008/01/05 11:13:37 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.750 2008/01/05 18:04:06 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -7248,12 +7248,12 @@
                        #
                }], [PST_TEXT, re_patch_cfd, PST_CFA, sub() {
                        if (!$seen_comment) {
-                               #$opt_warn_style and $line->log_warning("Comment expected.");
+                               $opt_warn_style and $line->log_warning("Comment expected.");
                        }
                        $line->log_warning("Please use unified diffs (diff -u) for patches.");
                }], [PST_TEXT, re_patch_ufd, PST_UFA, sub() {
                        if (!$seen_comment) {
-                               #$opt_warn_style and $line->log_warning("Comment expected.");
+                               $opt_warn_style and $line->log_warning("Comment expected.");
                        }
                }], [PST_TEXT, re_patch_text, PST_TEXT, sub() {
                        $seen_comment = true;
@@ -7265,14 +7265,14 @@
                        if ($seen_comment) {
                                $opt_warn_space and $line->log_note("Empty line expected.");
                        } else {
-                               #$opt_warn_style and $line->log_warning("Comment expected.");
+                               $opt_warn_style and $line->log_warning("Comment expected.");
                        }
                        $line->log_warning("Please use unified diffs (diff -u) for patches.");
                }], [PST_CENTER, re_patch_ufd, PST_UFA, sub() {
                        if ($seen_comment) {
                                $opt_warn_space and $line->log_note("Empty line expected.");
                        } else {
-                               #$opt_warn_style and $line->log_warning("Comment expected.");
+                               $opt_warn_style and $line->log_warning("Comment expected.");
                        }
                }], [PST_CENTER, undef, PST_TEXT, sub() {
                        $opt_warn_space and $line->log_note("Empty line expected.");



Home | Main Index | Thread Index | Old Index