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 Jul 31 22:39:36 UTC 2020
Modified Files:
pkgsrc/pkgtools/pkglint: Makefile
pkgsrc/pkgtools/pkglint/files: mklinechecker_test.go mklines_test.go
options_test.go vartypecheck.go vartypecheck_test.go
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.665 -r1.666 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.63 -r1.64 \
pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go
cvs rdiff -u -r1.64 -r1.65 pkgsrc/pkgtools/pkglint/files/mklines_test.go
cvs rdiff -u -r1.24 -r1.25 pkgsrc/pkgtools/pkglint/files/options_test.go
cvs rdiff -u -r1.93 -r1.94 pkgsrc/pkgtools/pkglint/files/vartypecheck.go
cvs rdiff -u -r1.85 -r1.86 pkgsrc/pkgtools/pkglint/files/vartypecheck_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.665 pkgsrc/pkgtools/pkglint/Makefile:1.666
--- pkgsrc/pkgtools/pkglint/Makefile:1.665 Thu Jul 23 19:09:10 2020
+++ pkgsrc/pkgtools/pkglint/Makefile Fri Jul 31 22:39:36 2020
@@ -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/}
Index: pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go
diff -u pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go:1.63 pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go:1.64
--- pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go:1.63 Sun Jun 7 15:49:23 2020
+++ pkgsrc/pkgtools/pkglint/files/mklinechecker_test.go Fri Jul 31 22:39:36 2020
@@ -862,7 +862,7 @@ func (s *Suite) Test_MkLineChecker_check
"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.")
}
Index: pkgsrc/pkgtools/pkglint/files/mklines_test.go
diff -u pkgsrc/pkgtools/pkglint/files/mklines_test.go:1.64 pkgsrc/pkgtools/pkglint/files/mklines_test.go:1.65
--- pkgsrc/pkgtools/pkglint/files/mklines_test.go:1.64 Fri Jun 12 19:14:45 2020
+++ pkgsrc/pkgtools/pkglint/files/mklines_test.go Fri Jul 31 22:39:36 2020
@@ -861,7 +861,7 @@ func (s *Suite) Test_MkLines_checkAll__w
"")
}
-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 @@ func (s *Suite) Test_MkLines_checkAll__u
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) {
Index: pkgsrc/pkgtools/pkglint/files/options_test.go
diff -u pkgsrc/pkgtools/pkglint/files/options_test.go:1.24 pkgsrc/pkgtools/pkglint/files/options_test.go:1.25
--- pkgsrc/pkgtools/pkglint/files/options_test.go:1.24 Sat May 23 08:51:07 2020
+++ pkgsrc/pkgtools/pkglint/files/options_test.go Fri Jul 31 22:39:36 2020
@@ -244,7 +244,7 @@ func (s *Suite) Test_CheckLinesOptionsMk
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 @@ func (s *Suite) Test_CheckLinesOptionsMk
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.
Index: pkgsrc/pkgtools/pkglint/files/vartypecheck.go
diff -u pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.93 pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.94
--- pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.93 Wed Jul 1 13:17:41 2020
+++ pkgsrc/pkgtools/pkglint/files/vartypecheck.go Fri Jul 31 22:39:36 2020
@@ -902,7 +902,7 @@ func (cv *VartypeCheck) Option() {
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 @@ func (cv *VartypeCheck) Pathlist() {
//
// 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) PathPattern() {
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
Index: pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go
diff -u pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.85 pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.86
--- pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.85 Wed Jul 1 13:17:41 2020
+++ pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go Fri Jul 31 22:39:36 2020
@@ -1476,7 +1476,7 @@ func (s *Suite) Test_VartypeCheck_Option
"-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