pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint pkgtools/pkglint: update to 5.5.8



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a4d263e64305
branches:  trunk
changeset: 378392:a4d263e64305
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Apr 06 21:04:22 2018 +0000

description:
pkgtools/pkglint: update to 5.5.8

Changes since 5.5.7:
* Enable the check for variable order in Makefiles by default.

diffstat:

 pkgtools/pkglint/Makefile              |  5 ++---
 pkgtools/pkglint/files/package.go      |  3 +++
 pkgtools/pkglint/files/package_test.go |  4 +++-
 pkgtools/pkglint/files/pkglint.go      |  2 +-
 pkgtools/pkglint/files/pkglint_test.go |  2 +-
 5 files changed, 10 insertions(+), 6 deletions(-)

diffs (71 lines):

diff -r 9aff2390de15 -r a4d263e64305 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Apr 06 20:22:24 2018 +0000
+++ b/pkgtools/pkglint/Makefile Fri Apr 06 21:04:22 2018 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.534 2018/03/30 11:56:25 bsiegert Exp $
+# $NetBSD: Makefile,v 1.535 2018/04/06 21:04:22 rillig Exp $
 
-PKGNAME=       pkglint-5.5.7
-PKGREVISION=   1
+PKGNAME=       pkglint-5.5.8
 DISTFILES=     # none
 CATEGORIES=    pkgtools
 
diff -r 9aff2390de15 -r a4d263e64305 pkgtools/pkglint/files/package.go
--- a/pkgtools/pkglint/files/package.go Fri Apr 06 20:22:24 2018 +0000
+++ b/pkgtools/pkglint/files/package.go Fri Apr 06 21:04:22 2018 +0000
@@ -708,6 +708,9 @@
                        }
                }
 
+               if firstRelevant == -1 {
+                       return true
+               }
                interesting := mklines.mklines[firstRelevant : lastRelevant+1]
 
                varcanon := func() string {
diff -r 9aff2390de15 -r a4d263e64305 pkgtools/pkglint/files/package_test.go
--- a/pkgtools/pkglint/files/package_test.go    Fri Apr 06 20:22:24 2018 +0000
+++ b/pkgtools/pkglint/files/package_test.go    Fri Apr 06 21:04:22 2018 +0000
@@ -397,7 +397,8 @@
                "WARN: ~/category/pkgbase/Makefile:8: To use the tool \"FALSE\" at load time, bsd.prefs.mk has to be included before.",
                "WARN: ~/category/pkgbase/Makefile:9: To use the tool \"NICE\" at load time, bsd.prefs.mk has to be included before.",
                "WARN: ~/category/pkgbase/Makefile:10: To use the tool \"TRUE\" at load time, bsd.prefs.mk has to be included before.",
-               "WARN: ~/category/pkgbase/Makefile:16: To use the tool \"NICE\" at load time, it has to be added to USE_TOOLS before including bsd.prefs.mk.")
+               "WARN: ~/category/pkgbase/Makefile:16: To use the tool \"NICE\" at load time, it has to be added to USE_TOOLS before including bsd.prefs.mk.",
+               "WARN: ~/category/pkgbase/Makefile:3: The canonical order of the variables is CATEGORIES, empty line, COMMENT, LICENSE.")
 }
 
 func (s *Suite) Test_Package_loadPackageMakefile(c *check.C) {
@@ -461,6 +462,7 @@
        G.checkdirPackage("category/package")
 
        t.CheckOutputLines(
+               "WARN: ~/category/package/Makefile:3: The canonical order of the variables is CATEGORIES, empty line, COMMENT, LICENSE.",
                "WARN: ~/category/package/options.mk:3: Unknown option \"zlib\".",
                "WARN: ~/category/package/options.mk:4: \"../../devel/zlib/buildlink3.mk\" is "+
                        "included conditionally here (depending on PKG_OPTIONS) and unconditionally in Makefile:5.",
diff -r 9aff2390de15 -r a4d263e64305 pkgtools/pkglint/files/pkglint.go
--- a/pkgtools/pkglint/files/pkglint.go Fri Apr 06 20:22:24 2018 +0000
+++ b/pkgtools/pkglint/files/pkglint.go Fri Apr 06 21:04:22 2018 +0000
@@ -229,7 +229,7 @@
        warn.AddFlagVar("absname", &gopts.WarnAbsname, true, "warn about use of absolute file names")
        warn.AddFlagVar("directcmd", &gopts.WarnDirectcmd, true, "warn about use of direct command names instead of Make variables")
        warn.AddFlagVar("extra", &gopts.WarnExtra, false, "enable some extra warnings")
-       warn.AddFlagVar("order", &gopts.WarnOrder, false, "warn if Makefile entries are unordered")
+       warn.AddFlagVar("order", &gopts.WarnOrder, true, "warn if Makefile entries are unordered")
        warn.AddFlagVar("perm", &gopts.WarnPerm, false, "warn about unforeseen variable definition and use")
        warn.AddFlagVar("plist-depr", &gopts.WarnPlistDepr, false, "warn about deprecated paths in PLISTs")
        warn.AddFlagVar("plist-sort", &gopts.WarnPlistSort, false, "warn about unsorted entries in PLISTs")
diff -r 9aff2390de15 -r a4d263e64305 pkgtools/pkglint/files/pkglint_test.go
--- a/pkgtools/pkglint/files/pkglint_test.go    Fri Apr 06 20:22:24 2018 +0000
+++ b/pkgtools/pkglint/files/pkglint_test.go    Fri Apr 06 21:04:22 2018 +0000
@@ -101,7 +101,7 @@
                "    absname      warn about use of absolute file names (enabled)",
                "    directcmd    warn about use of direct command names instead of Make variables (enabled)",
                "    extra        enable some extra warnings (disabled)",
-               "    order        warn if Makefile entries are unordered (disabled)",
+               "    order        warn if Makefile entries are unordered (enabled)",
                "    perm         warn about unforeseen variable definition and use (disabled)",
                "    plist-depr   warn about deprecated paths in PLISTs (disabled)",
                "    plist-sort   warn about unsorted entries in PLISTs (disabled)",



Home | Main Index | Thread Index | Old Index