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: Sun Nov 17 02:06:01 UTC 2019
Modified Files:
pkgsrc/pkgtools/pkglint: Makefile
pkgsrc/pkgtools/pkglint/files: pkgsrc.go pkgsrc_test.go
pkgsrc/pkgtools/pkglint/files/intqa: testnames_test.go
Log Message:
pkgtools/pkglint: update to 19.3.8
Changes since 19.3.7:
Made check for doc/CHANGES file stricter. The check now catches entries
for added packages that are missing the word "version".
To generate a diff of this commit:
cvs rdiff -u -r1.607 -r1.608 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.38 -r1.39 pkgsrc/pkgtools/pkglint/files/pkgsrc.go
cvs rdiff -u -r1.32 -r1.33 pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/pkgtools/pkglint/files/intqa/testnames_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.607 pkgsrc/pkgtools/pkglint/Makefile:1.608
--- pkgsrc/pkgtools/pkglint/Makefile:1.607 Sun Nov 17 01:26:25 2019
+++ pkgsrc/pkgtools/pkglint/Makefile Sun Nov 17 02:06:01 2019
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.607 2019/11/17 01:26:25 rillig Exp $
+# $NetBSD: Makefile,v 1.608 2019/11/17 02:06:01 rillig Exp $
-PKGNAME= pkglint-19.3.7
+PKGNAME= pkglint-19.3.8
CATEGORIES= pkgtools
DISTNAME= tools
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
Index: pkgsrc/pkgtools/pkglint/files/pkgsrc.go
diff -u pkgsrc/pkgtools/pkglint/files/pkgsrc.go:1.38 pkgsrc/pkgtools/pkglint/files/pkgsrc.go:1.39
--- pkgsrc/pkgtools/pkglint/files/pkgsrc.go:1.38 Sun Nov 17 01:26:25 2019
+++ pkgsrc/pkgtools/pkglint/files/pkgsrc.go Sun Nov 17 02:06:01 2019
@@ -269,7 +269,7 @@ func (*Pkgsrc) parseDocChange(line *Line
f := strings.Fields(lex.Rest())
n := len(f)
- if n != 4 && n != 6 {
+ if n < 4 || n > 6 {
return nil
}
Index: pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go
diff -u pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go:1.32 pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go:1.33
--- pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go:1.32 Sun Nov 17 01:26:25 2019
+++ pkgsrc/pkgtools/pkglint/files/pkgsrc_test.go Sun Nov 17 02:06:01 2019
@@ -355,6 +355,9 @@ func (s *Suite) Test_Pkgsrc_parseDocChan
test("\tAdded something [author date]",
"WARN: doc/CHANGES-2019:123: Unknown doc/CHANGES line: \tAdded something [author date]")
+ test("\tAdded category/package 1.0 [author 2019-11-17]",
+ "WARN: doc/CHANGES-2019:123: Unknown doc/CHANGES line: \tAdded category/package 1.0 [author 2019-11-17]")
+
test("\t\tToo large indentation",
"WARN: doc/CHANGES-2019:123: Package changes should be indented using a single tab, not \"\\t\\t\".")
test("\t Too large indentation",
Index: pkgsrc/pkgtools/pkglint/files/intqa/testnames_test.go
diff -u pkgsrc/pkgtools/pkglint/files/intqa/testnames_test.go:1.1 pkgsrc/pkgtools/pkglint/files/intqa/testnames_test.go:1.2
--- pkgsrc/pkgtools/pkglint/files/intqa/testnames_test.go:1.1 Sun Nov 17 01:26:26 2019
+++ pkgsrc/pkgtools/pkglint/files/intqa/testnames_test.go Sun Nov 17 02:06:01 2019
@@ -47,6 +47,26 @@ func (s *Suite) CheckSummary(summary str
s.summary = ""
}
+func (s *Suite) Test_TestNameChecker_Enable(c *check.C) {
+ ck := s.Init(c)
+
+ ck.Enable(ENone) // overwrite initialization from Suite.Init
+
+ c.Check(ck.errorsMask, check.Equals, uint64(0))
+
+ ck.Enable(EAll)
+
+ c.Check(ck.errorsMask, check.Equals, ^uint64(0))
+
+ ck.Enable(ENone, EMissingTest)
+
+ c.Check(ck.errorsMask, check.Equals, uint64(4))
+
+ ck.Enable(EAll, -EMissingTest)
+
+ c.Check(ck.errorsMask, check.Equals, ^uint64(0)^4)
+}
+
func (s *Suite) Test_TestNameChecker_Check(c *check.C) {
ck := s.Init(c)
@@ -55,7 +75,6 @@ func (s *Suite) Test_TestNameChecker_Che
s.CheckErrors(
"Missing unit test \"Test_NewTestNameChecker\" for \"NewTestNameChecker\".",
"Missing unit test \"Test_TestNameChecker_IgnoreFiles\" for \"TestNameChecker.IgnoreFiles\".",
- "Missing unit test \"Test_TestNameChecker_Enable\" for \"TestNameChecker.Enable\".",
"Missing unit test \"Test_TestNameChecker_load\" for \"TestNameChecker.load\".",
"Missing unit test \"Test_TestNameChecker_loadDecl\" for \"TestNameChecker.loadDecl\".",
"Missing unit test \"Test_TestNameChecker_addCode\" for \"TestNameChecker.addCode\".",
@@ -72,7 +91,7 @@ func (s *Suite) Test_TestNameChecker_Che
"Missing unit test \"Test_Suite_CheckErrors\" for \"Suite.CheckErrors\".",
"Missing unit test \"Test_Suite_CheckSummary\" for \"Suite.CheckSummary\".",
"Missing unit test \"Test_Value_Method\" for \"Value.Method\".")
- s.CheckSummary("19 errors.")
+ s.CheckSummary("18 errors.")
}
func (s *Suite) Test_TestNameChecker_addTest(c *check.C) {
Home |
Main Index |
Thread Index |
Old Index