pkgsrc-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 5.6.11



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d3d9db642f8
branches:  trunk
changeset: 327950:0d3d9db642f8
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jan 13 19:55:52 2019 +0000

description:
pkgtools/pkglint: update to 5.6.11

Changes since 5.6.10:

* Improved the wording of several warnings

* Fixed parsing of complicated dependency patterns such as
  {ssh{,6}-[0-9]*,openssh-[0-9]*}. Pkglint still doesn't understand
  them but at least it doesn't mark them as "unknown" anymore.

* Lots of refactoring, as usual. This is the last part of the big
  refactoring, therefore future changes to pkglint are expected to be
  smaller than in the previous 3 months.

diffstat:

 pkgtools/pkglint/Makefile                          |    4 +-
 pkgtools/pkglint/PLIST                             |    5 +-
 pkgtools/pkglint/files/alternatives_test.go        |    4 +-
 pkgtools/pkglint/files/autofix_test.go             |   94 ++--
 pkgtools/pkglint/files/buildlink3.go               |    5 +-
 pkgtools/pkglint/files/buildlink3_test.go          |   42 +-
 pkgtools/pkglint/files/category_test.go            |   34 +-
 pkgtools/pkglint/files/check_test.go               |   70 +-
 pkgtools/pkglint/files/cmd/pkglint/pkglint.go      |    4 +-
 pkgtools/pkglint/files/cmd/pkglint/pkglint_test.go |   48 ++
 pkgtools/pkglint/files/distinfo_test.go            |   30 +-
 pkgtools/pkglint/files/files_test.go               |    4 +-
 pkgtools/pkglint/files/licenses/licenses_test.go   |   33 +-
 pkgtools/pkglint/files/licenses_test.go            |    4 +-
 pkgtools/pkglint/files/linechecker_test.go         |    4 +-
 pkgtools/pkglint/files/lines_test.go               |    4 +-
 pkgtools/pkglint/files/logging_test.go             |   52 +-
 pkgtools/pkglint/files/mkline.go                   |    8 +-
 pkgtools/pkglint/files/mkline_test.go              |  233 +++++++----
 pkgtools/pkglint/files/mklinechecker.go            |   12 +-
 pkgtools/pkglint/files/mklinechecker_test.go       |  204 +++++----
 pkgtools/pkglint/files/mklines.go                  |    2 +-
 pkgtools/pkglint/files/mklines_test.go             |  150 +++---
 pkgtools/pkglint/files/mklines_varalign_test.go    |    4 +-
 pkgtools/pkglint/files/mkparser.go                 |  169 ++++++++-
 pkgtools/pkglint/files/mkparser_test.go            |  165 +++++++-
 pkgtools/pkglint/files/mkshparser.go               |   12 +-
 pkgtools/pkglint/files/mkshparser_test.go          |   54 ++-
 pkgtools/pkglint/files/mktypes.go                  |    5 +
 pkgtools/pkglint/files/options_test.go             |   40 +-
 pkgtools/pkglint/files/package.go                  |    6 +-
 pkgtools/pkglint/files/package_test.go             |  114 ++--
 pkgtools/pkglint/files/parser.go                   |  123 ------
 pkgtools/pkglint/files/parser_test.go              |   97 ----
 pkgtools/pkglint/files/patches_test.go             |   30 +-
 pkgtools/pkglint/files/pkglint.go                  |  145 ++++--
 pkgtools/pkglint/files/pkglint_test.go             |  380 +++++++++++-------
 pkgtools/pkglint/files/pkgsrc.go                   |   76 ++-
 pkgtools/pkglint/files/pkgsrc_test.go              |  100 ++--
 pkgtools/pkglint/files/pkgver/vercmp.go            |    4 +-
 pkgtools/pkglint/files/pkgver/vercmp_test.go       |   70 ++-
 pkgtools/pkglint/files/plist.go                    |   97 ++--
 pkgtools/pkglint/files/plist_test.go               |  136 ++++--
 pkgtools/pkglint/files/regex/regex.go              |   13 +-
 pkgtools/pkglint/files/shell.go                    |  150 ++++--
 pkgtools/pkglint/files/shell_test.go               |  362 +++++++++--------
 pkgtools/pkglint/files/shtokenizer.go              |   44 +-
 pkgtools/pkglint/files/shtokenizer_test.go         |   75 ++-
 pkgtools/pkglint/files/shtypes.go                  |    3 +
 pkgtools/pkglint/files/substcontext.go             |    6 +-
 pkgtools/pkglint/files/substcontext_test.go        |   49 +-
 pkgtools/pkglint/files/tools.go                    |   61 +-
 pkgtools/pkglint/files/tools_test.go               |   70 +-
 pkgtools/pkglint/files/toplevel_test.go            |    2 +-
 pkgtools/pkglint/files/util.go                     |  129 +++---
 pkgtools/pkglint/files/util_test.go                |  159 ++++++-
 pkgtools/pkglint/files/vardefs.go                  |   31 +-
 pkgtools/pkglint/files/vardefs_test.go             |   43 +-
 pkgtools/pkglint/files/vartype.go                  |   23 +-
 pkgtools/pkglint/files/vartype_test.go             |   15 +-
 pkgtools/pkglint/files/vartypecheck.go             |  239 +++++++---
 pkgtools/pkglint/files/vartypecheck_test.go        |  426 +++++++++++++++-----
 62 files changed, 2873 insertions(+), 1904 deletions(-)

diffs (truncated from 11209 to 300 lines):

diff -r 056490d2a39b -r 0d3d9db642f8 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Sun Jan 13 18:22:34 2019 +0000
+++ b/pkgtools/pkglint/Makefile Sun Jan 13 19:55:52 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.563 2018/12/21 14:24:18 rillig Exp $
+# $NetBSD: Makefile,v 1.564 2019/01/13 19:55:52 rillig Exp $
 
-PKGNAME=       pkglint-5.6.10
+PKGNAME=       pkglint-5.6.11
 CATEGORIES=    pkgtools
 DISTNAME=      tools
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=golang/}
diff -r 056490d2a39b -r 0d3d9db642f8 pkgtools/pkglint/PLIST
--- a/pkgtools/pkglint/PLIST    Sun Jan 13 18:22:34 2019 +0000
+++ b/pkgtools/pkglint/PLIST    Sun Jan 13 19:55:52 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2018/12/17 00:15:39 rillig Exp $
+@comment $NetBSD: PLIST,v 1.9 2019/01/13 19:55:52 rillig Exp $
 bin/pkglint
 gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint.a
 gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/getopt.a
@@ -19,6 +19,7 @@
 gopkg/src/netbsd.org/pkglint/category_test.go
 gopkg/src/netbsd.org/pkglint/check_test.go
 gopkg/src/netbsd.org/pkglint/cmd/pkglint/pkglint.go
+gopkg/src/netbsd.org/pkglint/cmd/pkglint/pkglint_test.go
 gopkg/src/netbsd.org/pkglint/distinfo.go
 gopkg/src/netbsd.org/pkglint/distinfo_test.go
 gopkg/src/netbsd.org/pkglint/expecter.go
@@ -68,8 +69,6 @@
 gopkg/src/netbsd.org/pkglint/options_test.go
 gopkg/src/netbsd.org/pkglint/package.go
 gopkg/src/netbsd.org/pkglint/package_test.go
-gopkg/src/netbsd.org/pkglint/parser.go
-gopkg/src/netbsd.org/pkglint/parser_test.go
 gopkg/src/netbsd.org/pkglint/patches.go
 gopkg/src/netbsd.org/pkglint/patches_test.go
 gopkg/src/netbsd.org/pkglint/pkglint.0
diff -r 056490d2a39b -r 0d3d9db642f8 pkgtools/pkglint/files/alternatives_test.go
--- a/pkgtools/pkglint/files/alternatives_test.go       Sun Jan 13 18:22:34 2019 +0000
+++ b/pkgtools/pkglint/files/alternatives_test.go       Sun Jan 13 19:55:52 2019 +0000
@@ -5,7 +5,7 @@
 func (s *Suite) Test_CheckFileAlternatives__PLIST(c *check.C) {
        t := s.Init(c)
 
-       t.SetupPackage("category/package")
+       t.SetUpPackage("category/package")
        t.Chdir("category/package")
        t.CreateFileLines("ALTERNATIVES",
                "sbin/sendmail @PREFIX@/sbin/sendmail.postfix@POSTFIXVER@",
@@ -37,7 +37,7 @@
                "ERROR: ALTERNATIVES:7: Alternative implementation \"@VARBASE@/game/scores\" "+
                        "must appear in the PLIST as \"${VARBASE}/game/scores\".")
 
-       t.SetupCommandLine("--autofix")
+       t.SetUpCommandLine("--autofix")
 
        G.Check(".")
 
diff -r 056490d2a39b -r 0d3d9db642f8 pkgtools/pkglint/files/autofix_test.go
--- a/pkgtools/pkglint/files/autofix_test.go    Sun Jan 13 18:22:34 2019 +0000
+++ b/pkgtools/pkglint/files/autofix_test.go    Sun Jan 13 19:55:52 2019 +0000
@@ -22,8 +22,8 @@
 func (s *Suite) Test_Autofix__default_leaves_line_unchanged(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--source")
-       mklines := t.SetupFileMkLines("Makefile",
+       t.SetUpCommandLine("--source")
+       mklines := t.SetUpFileMkLines("Makefile",
                "# row 1 \\",
                "continuation of row 1")
        line := mklines.lines.Lines[0]
@@ -50,8 +50,8 @@
 func (s *Suite) Test_Autofix__show_autofix_modifies_line(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--source", "--show-autofix")
-       mklines := t.SetupFileMkLines("Makefile",
+       t.SetUpCommandLine("--source", "--show-autofix")
+       mklines := t.SetUpFileMkLines("Makefile",
                "# row 1 \\",
                "continuation of row 1")
        line := mklines.lines.Lines[0]
@@ -86,8 +86,8 @@
 func (s *Suite) Test_Autofix_ReplaceAfter__autofix(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix", "--source")
-       mklines := t.SetupFileMkLines("Makefile",
+       t.SetUpCommandLine("--autofix", "--source")
+       mklines := t.SetUpFileMkLines("Makefile",
                "# line 1 \\",
                "continuation 1 \\",
                "continuation 2")
@@ -108,8 +108,8 @@
 func (s *Suite) Test_Autofix_ReplaceRegex__show_autofix(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix")
-       lines := t.SetupFileLines("Makefile",
+       t.SetUpCommandLine("--show-autofix")
+       lines := t.SetUpFileLines("Makefile",
                "line1",
                "line2",
                "line3")
@@ -137,8 +137,8 @@
 func (s *Suite) Test_Autofix_ReplaceRegex__autofix(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix", "--source")
-       lines := t.SetupFileLines("Makefile",
+       t.SetUpCommandLine("--autofix", "--source")
+       lines := t.SetUpFileLines("Makefile",
                "line1",
                "line2",
                "line3")
@@ -177,8 +177,8 @@
 func (s *Suite) Test_Autofix_ReplaceRegex__show_autofix_and_source(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
-       lines := t.SetupFileLines("Makefile",
+       t.SetUpCommandLine("--show-autofix", "--source")
+       lines := t.SetUpFileLines("Makefile",
                "line1",
                "line2",
                "line3")
@@ -213,8 +213,8 @@
 func (s *Suite) Test_SaveAutofixChanges(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix")
-       lines := t.SetupFileLines("example.txt",
+       t.SetUpCommandLine("--autofix")
+       lines := t.SetUpFileLines("example.txt",
                "line1 := value1",
                "line2 := value2",
                "line3 := value3")
@@ -238,8 +238,8 @@
 func (s *Suite) Test_SaveAutofixChanges__no_changes_necessary(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix")
-       lines := t.SetupFileLines("DESCR",
+       t.SetUpCommandLine("--autofix")
+       lines := t.SetUpFileLines("DESCR",
                "Line 1",
                "Line 2")
 
@@ -259,7 +259,7 @@
 func (s *Suite) Test_Autofix__multiple_fixes(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--explain")
+       t.SetUpCommandLine("--show-autofix", "--explain")
 
        line := t.NewLine("filename", 1, "original")
 
@@ -338,7 +338,7 @@
 func (s *Suite) Test_Autofix_Explain__default(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--explain")
+       t.SetUpCommandLine("--explain")
        line := t.NewLine("Makefile", 74, "line1")
 
        fix := line.Autofix()
@@ -358,7 +358,7 @@
 func (s *Suite) Test_Autofix_Explain__show_autofix(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--explain")
+       t.SetUpCommandLine("--show-autofix", "--explain")
        line := t.NewLine("Makefile", 74, "line1")
 
        fix := line.Autofix()
@@ -379,7 +379,7 @@
 func (s *Suite) Test_Autofix_Explain__autofix(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix", "--explain")
+       t.SetUpCommandLine("--autofix", "--explain")
        line := t.NewLine("Makefile", 74, "line1")
 
        fix := line.Autofix()
@@ -396,7 +396,7 @@
 func (s *Suite) Test_Autofix_Explain__SilentAutofixFormat(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--explain")
+       t.SetUpCommandLine("--explain")
        line := t.NewLine("example.txt", 1, "Text")
 
        fix := line.Autofix()
@@ -411,7 +411,7 @@
 func (s *Suite) Test_Autofix_Explain__silent_with_diagnostic(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--explain")
+       t.SetUpCommandLine("--explain")
        line := t.NewLine("example.txt", 1, "Text")
 
        fix := line.Autofix()
@@ -438,8 +438,8 @@
 func (s *Suite) Test_Autofix__show_autofix_and_source_continuation_line(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
-       mklines := t.SetupFileMkLines("Makefile",
+       t.SetUpCommandLine("--show-autofix", "--source")
+       mklines := t.SetUpFileMkLines("Makefile",
                MkRcsID,
                "# before \\",
                "The old song \\",
@@ -468,7 +468,7 @@
 func (s *Suite) Test_Autofix_InsertBefore(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
+       t.SetUpCommandLine("--show-autofix", "--source")
        line := t.NewLine("Makefile", 30, "original")
 
        fix := line.Autofix()
@@ -486,7 +486,7 @@
 func (s *Suite) Test_Autofix_Delete(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
+       t.SetUpCommandLine("--show-autofix", "--source")
        line := t.NewLine("Makefile", 30, "to be deleted")
 
        fix := line.Autofix()
@@ -504,8 +504,8 @@
 func (s *Suite) Test_Autofix_Delete__continuation_line(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
-       mklines := t.SetupFileMkLines("Makefile",
+       t.SetUpCommandLine("--show-autofix", "--source")
+       mklines := t.SetUpFileMkLines("Makefile",
                MkRcsID,
                "# line 1 \\",
                "continued")
@@ -527,7 +527,7 @@
 func (s *Suite) Test_Autofix_Delete__combined_with_insert(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
+       t.SetUpCommandLine("--show-autofix", "--source")
        line := t.NewLine("Makefile", 30, "to be deleted")
 
        fix := line.Autofix()
@@ -552,7 +552,7 @@
 func (s *Suite) Test_Autofix__suppress_unfixable_warnings(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--show-autofix", "--source")
+       t.SetUpCommandLine("--show-autofix", "--source")
        lines := t.NewLines("Makefile",
                "line1",
                "line2",
@@ -629,7 +629,7 @@
        t.CheckOutputLines(
                "WARN: Makefile:1: Please write in ALL-UPPERCASE.")
 
-       t.SetupCommandLine("--show-autofix")
+       t.SetUpCommandLine("--show-autofix")
 
        doFix(lines.Lines[1])
 
@@ -638,7 +638,7 @@
                "AUTOFIX: Makefile:2: Converting to uppercase")
        c.Check(lines.Lines[1].Text, equals, "LINE2")
 
-       t.SetupCommandLine("--autofix")
+       t.SetUpCommandLine("--autofix")
 
        doFix(lines.Lines[2])
 
@@ -651,9 +651,9 @@
 func (s *Suite) Test_Autofix_skip(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--only", "few", "--autofix")
+       t.SetUpCommandLine("--only", "few", "--autofix")
 
-       mklines := t.SetupFileMkLines("filename",
+       mklines := t.SetUpFileMkLines("filename",
                "VAR=\t111 222 333 444 555 \\",
                "666")
        lines := mklines.lines
@@ -691,7 +691,7 @@
 func (s *Suite) Test_Autofix_Apply__only(c *check.C) {
        t := s.Init(c)
 
-       t.SetupCommandLine("--autofix", "--source", "--only", "interesting")
+       t.SetUpCommandLine("--autofix", "--source", "--only", "interesting")
        line := t.NewLine("Makefile", 27, "The old song")
 



Home | Main Index | Thread Index | Old Index