Source-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 20.2.5



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e3618e5f971
branches:  trunk
changeset: 436360:5e3618e5f971
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Jul 31 22:39:36 2020 +0000

description:
pkgtools/pkglint: update to 20.2.5

Changes since 20.2.4:

The warning about "unknown options" has been reworded to "undocumented
options", since that is more precise and less confusing.

In pathnames and pathname patterns, the exclamation mark is allowed.
This is necessary for Go packages like devel/gopls.

diffstat:

 pkgtools/pkglint/Makefile                    |  4 ++--
 pkgtools/pkglint/files/mklinechecker_test.go |  2 +-
 pkgtools/pkglint/files/mklines_test.go       |  4 ++--
 pkgtools/pkglint/files/options_test.go       |  4 ++--
 pkgtools/pkglint/files/vartypecheck.go       |  8 ++++----
 pkgtools/pkglint/files/vartypecheck_test.go  |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diffs (110 lines):

diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/Makefile Fri Jul 31 22:39:36 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.665 2020/07/23 19:09:10 rillig Exp $
+# $NetBSD: Makefile,v 1.666 2020/07/31 22:39:36 rillig Exp $
 
-PKGNAME=       pkglint-20.2.4
+PKGNAME=       pkglint-20.2.5
 CATEGORIES=    pkgtools
 DISTNAME=      tools
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=golang/}
diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/files/mklinechecker_test.go
--- a/pkgtools/pkglint/files/mklinechecker_test.go      Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/files/mklinechecker_test.go      Fri Jul 31 22:39:36 2020 +0000
@@ -862,7 +862,7 @@
                "WARN: opsys.mk:9: Comment \"MACHINE_ARCH\" does not match condition \"${OS_VERSION:M8.*}\" in line 8.",
                "WARN: opsys.mk:10: Comment \"OS_VERSION\" does not match condition \"${MACHINE_ARCH} == x86_64\" in line 7.",
                "WARN: opsys.mk:12: Comment \"j\" does not match loop \"i in 1 2 3 4 5\" in line 5.",
-               "WARN: opsys.mk:14: Unknown option \"option\".",
+               "WARN: opsys.mk:14: Undocumented option \"option\".",
                "WARN: opsys.mk:22: Comment \"NetBSD\" does not match condition \"${OPSYS} == FreeBSD\" in line 21.",
                "WARN: opsys.mk:26: Comment \"ii\" does not match loop \"jj in 1 2\" in line 25.")
 }
diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/files/mklines_test.go
--- a/pkgtools/pkglint/files/mklines_test.go    Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/files/mklines_test.go    Fri Jul 31 22:39:36 2020 +0000
@@ -861,7 +861,7 @@
                "")
 }
 
-func (s *Suite) Test_MkLines_checkAll__unknown_options(c *check.C) {
+func (s *Suite) Test_MkLines_checkAll__undocumented_options(c *check.C) {
        t := s.Init(c)
 
        t.SetUpVartypes()
@@ -876,7 +876,7 @@
        mklines.Check()
 
        t.CheckOutputLines(
-               "WARN: options.mk:4: Unknown option \"unknown\".")
+               "WARN: options.mk:4: Undocumented option \"unknown\".")
 }
 
 func (s *Suite) Test_MkLines_checkAll__PLIST_VARS(c *check.C) {
diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/files/options_test.go
--- a/pkgtools/pkglint/files/options_test.go    Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/files/options_test.go    Fri Jul 31 22:39:36 2020 +0000
@@ -244,7 +244,7 @@
 
        t.CheckOutputLines(
                // This warning comes from VarTypeCheck.PkgOption
-               "WARN: options.mk:11: Unknown option \"negative\".",
+               "WARN: options.mk:11: Undocumented option \"negative\".",
                "WARN: options.mk:4: "+
                        "Option \"option\" should be handled below in an .if block.")
 }
@@ -304,7 +304,7 @@
 
        t.CheckOutputLines(
                "WARN: ~/category/package/options.mk:6: l is used but not defined.",
-               "WARN: ~/category/package/options.mk:18: Unknown option \"undeclared\".",
+               "WARN: ~/category/package/options.mk:18: Undocumented option \"undeclared\".",
                "WARN: ~/category/package/options.mk:21: "+
                        "The positive branch of the .if/.else should be the one where the option is set.",
                // TODO: The diagnostics should appear in the correct order.
diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/files/vartypecheck.go
--- a/pkgtools/pkglint/files/vartypecheck.go    Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/files/vartypecheck.go    Fri Jul 31 22:39:36 2020 +0000
@@ -902,7 +902,7 @@
 
        if !strings.ContainsAny(optname, "*?[") {
                if _, found := G.Pkgsrc.PkgOptions[optname]; !found {
-                       cv.Warnf("Unknown option %q.", optname)
+                       cv.Warnf("Undocumented option %q.", optname)
                        cv.Explain(
                                "This option is not documented in the mk/defaults/options.description file.",
                                "Please think of a brief but precise description and either",
@@ -945,7 +945,7 @@
 //
 // See FilePattern.
 func (cv *VartypeCheck) PathPattern() {
-       invalid := replaceAll(cv.ValueNoVar, `[%*+,\-./0-9?@A-Z\[\]_a-z~]`, "")
+       invalid := replaceAll(cv.ValueNoVar, `[!%*+,\-./0-9?@A-Z\[\]_a-z~]`, "")
        if invalid == "" {
                return
        }
@@ -964,8 +964,8 @@
 func (cv *VartypeCheck) Pathname() {
        valid := regex.Pattern(condStr(
                cv.Op == opUseMatch,
-               `[%*+,\-./0-9?@A-Z\[\]_a-z~]`,
-               `[%+,\-./0-9@A-Z_a-z~]`))
+               `[!%*+,\-./0-9?@A-Z\[\]_a-z~]`,
+               `[!%+,\-./0-9@A-Z_a-z~]`))
        invalid := replaceAll(cv.ValueNoVar, valid, "")
        if invalid == "" {
                return
diff -r 54d033f0cca0 -r 5e3618e5f971 pkgtools/pkglint/files/vartypecheck_test.go
--- a/pkgtools/pkglint/files/vartypecheck_test.go       Fri Jul 31 21:50:28 2020 +0000
+++ b/pkgtools/pkglint/files/vartypecheck_test.go       Fri Jul 31 22:39:36 2020 +0000
@@ -1476,7 +1476,7 @@
                "-invalid")
 
        vt.Output(
-               "WARN: filename.mk:3: Unknown option \"unknown\".",
+               "WARN: filename.mk:3: Undocumented option \"unknown\".",
                "WARN: filename.mk:4: Use of the underscore character in option names is deprecated.",
                "ERROR: filename.mk:5: Invalid option name \"UPPER\". "+
                        "Option names must start with a lowercase letter and be all-lowercase.",



Home | Main Index | Thread Index | Old Index