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.
This commit is contained in:
parent
817b83d23a
commit
34a761714d
6 changed files with 12 additions and 12 deletions
|
@ -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/}
|
||||
|
|
|
@ -862,7 +862,7 @@ func (s *Suite) Test_MkLineChecker_checkDirectiveEnd__ending_comments(c *check.C
|
|||
"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.")
|
||||
}
|
||||
|
|
|
@ -861,7 +861,7 @@ func (s *Suite) Test_MkLines_checkAll__wip_category_Makefile(c *check.C) {
|
|||
"")
|
||||
}
|
||||
|
||||
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__unknown_options(c *check.C) {
|
|||
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) {
|
||||
|
|
|
@ -244,7 +244,7 @@ func (s *Suite) Test_CheckLinesOptionsMk__conditionals(c *check.C) {
|
|||
|
||||
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(c *check.C) {
|
|||
|
||||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1476,7 +1476,7 @@ func (s *Suite) Test_VartypeCheck_Option(c *check.C) {
|
|||
"-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.",
|
||||
|
|
Loading…
Reference in a new issue