pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/pkglint



Module Name:    pkgsrc
Committed By:   rillig
Date:           Fri Apr  6 21:04:22 UTC 2018

Modified Files:
        pkgsrc/pkgtools/pkglint: Makefile
        pkgsrc/pkgtools/pkglint/files: package.go package_test.go pkglint.go
            pkglint_test.go

Log Message:
pkgtools/pkglint: update to 5.5.8

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


To generate a diff of this commit:
cvs rdiff -u -r1.534 -r1.535 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/pkgtools/pkglint/files/package.go
cvs rdiff -u -r1.20 -r1.21 pkgsrc/pkgtools/pkglint/files/package_test.go
cvs rdiff -u -r1.29 -r1.30 pkgsrc/pkgtools/pkglint/files/pkglint.go
cvs rdiff -u -r1.17 -r1.18 pkgsrc/pkgtools/pkglint/files/pkglint_test.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkglint/Makefile
diff -u pkgsrc/pkgtools/pkglint/Makefile:1.534 pkgsrc/pkgtools/pkglint/Makefile:1.535
--- pkgsrc/pkgtools/pkglint/Makefile:1.534      Fri Mar 30 11:56:25 2018
+++ pkgsrc/pkgtools/pkglint/Makefile    Fri Apr  6 21:04:22 2018
@@ -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
 

Index: pkgsrc/pkgtools/pkglint/files/package.go
diff -u pkgsrc/pkgtools/pkglint/files/package.go:1.27 pkgsrc/pkgtools/pkglint/files/package.go:1.28
--- pkgsrc/pkgtools/pkglint/files/package.go:1.27       Sat Mar 24 14:32:49 2018
+++ pkgsrc/pkgtools/pkglint/files/package.go    Fri Apr  6 21:04:22 2018
@@ -708,6 +708,9 @@ func (pkg *Package) CheckVarorder(mkline
                        }
                }
 
+               if firstRelevant == -1 {
+                       return true
+               }
                interesting := mklines.mklines[firstRelevant : lastRelevant+1]
 
                varcanon := func() string {

Index: pkgsrc/pkgtools/pkglint/files/package_test.go
diff -u pkgsrc/pkgtools/pkglint/files/package_test.go:1.20 pkgsrc/pkgtools/pkglint/files/package_test.go:1.21
--- pkgsrc/pkgtools/pkglint/files/package_test.go:1.20  Sat Mar 24 14:32:49 2018
+++ pkgsrc/pkgtools/pkglint/files/package_test.go       Fri Apr  6 21:04:22 2018
@@ -397,7 +397,8 @@ func (s *Suite) Test_Package__varuse_at_
                "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 @@ func (s *Suite) Test_Package_conditional
        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.",

Index: pkgsrc/pkgtools/pkglint/files/pkglint.go
diff -u pkgsrc/pkgtools/pkglint/files/pkglint.go:1.29 pkgsrc/pkgtools/pkglint/files/pkglint.go:1.30
--- pkgsrc/pkgtools/pkglint/files/pkglint.go:1.29       Sat Mar 24 14:32:49 2018
+++ pkgsrc/pkgtools/pkglint/files/pkglint.go    Fri Apr  6 21:04:22 2018
@@ -229,7 +229,7 @@ func (pkglint *Pkglint) ParseCommandLine
        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")

Index: pkgsrc/pkgtools/pkglint/files/pkglint_test.go
diff -u pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.17 pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.18
--- pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.17  Sat Mar 24 14:32:49 2018
+++ pkgsrc/pkgtools/pkglint/files/pkglint_test.go       Fri Apr  6 21:04:22 2018
@@ -101,7 +101,7 @@ func (s *Suite) Test_Pkglint_Main__unkno
                "    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