Received: by mail.netbsd.org (Postfix, from userid 605) id 68D3C84EE0; Fri, 6 Apr 2018 21:04:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id B5FB184CD7 for ; Fri, 6 Apr 2018 21:04:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id I9iKgCgWx9Ks for ; Fri, 6 Apr 2018 21:04:22 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id BB41084DEA for ; Fri, 6 Apr 2018 21:04:22 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id B4574FBEC; Fri, 6 Apr 2018 21:04:22 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_152304866213770" MIME-Version: 1.0 Date: Fri, 6 Apr 2018 21:04:22 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/pkglint To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20180406210422.B4574FBEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_152304866213770 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_152304866213770 Content-Disposition: inline Content-Length: 4913 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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)", --_----------=_152304866213770--