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.7.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d2b9581cc33f
branches:  trunk
changeset: 319832:d2b9581cc33f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Feb 21 23:44:55 2019 +0000

description:
pkgtools/pkglint: update to 5.7.1

Changes since 5.7.0:

* Removed a line of code that was meant only for development, not for
  production use, from util.go.

diffstat:

 pkgtools/pkglint/Makefile                    |   4 ++--
 pkgtools/pkglint/files/mkline.go             |   2 +-
 pkgtools/pkglint/files/mkline_test.go        |   2 +-
 pkgtools/pkglint/files/mklinechecker.go      |  12 ++++++------
 pkgtools/pkglint/files/mklinechecker_test.go |   8 ++++----
 pkgtools/pkglint/files/mklines.go            |   2 +-
 pkgtools/pkglint/files/mklines_test.go       |   2 +-
 pkgtools/pkglint/files/mkparser_test.go      |   2 +-
 pkgtools/pkglint/files/mkshwalker.go         |   2 +-
 pkgtools/pkglint/files/mkshwalker_test.go    |   2 +-
 pkgtools/pkglint/files/package.go            |  12 ++++++------
 pkgtools/pkglint/files/pkglint.1             |   2 +-
 pkgtools/pkglint/files/pkgsrc_test.go        |   2 +-
 pkgtools/pkglint/files/shell.go              |   2 +-
 pkgtools/pkglint/files/shell_test.go         |   3 +--
 pkgtools/pkglint/files/util.go               |   2 +-
 pkgtools/pkglint/files/vartype.go            |   4 ++--
 pkgtools/pkglint/files/vartypecheck.go       |   4 ++--
 18 files changed, 34 insertions(+), 35 deletions(-)

diffs (272 lines):

diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/Makefile Thu Feb 21 23:44:55 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.567 2019/02/21 22:49:03 rillig Exp $
+# $NetBSD: Makefile,v 1.568 2019/02/21 23:44:55 rillig Exp $
 
-PKGNAME=       pkglint-5.7.0
+PKGNAME=       pkglint-5.7.1
 CATEGORIES=    pkgtools
 DISTNAME=      tools
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=golang/}
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mkline.go
--- a/pkgtools/pkglint/files/mkline.go  Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mkline.go  Thu Feb 21 23:44:55 2019 +0000
@@ -761,7 +761,7 @@
 
 func (mkline *MkLineImpl) DetermineUsedVariables() []string {
        // TODO: It would be good to have these variables as MkVarUse objects
-       // including the context in which they are used.
+       //  including the context in which they are used.
 
        var varnames []string
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mkline_test.go
--- a/pkgtools/pkglint/files/mkline_test.go     Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mkline_test.go     Thu Feb 21 23:44:55 2019 +0000
@@ -709,7 +709,7 @@
 }
 
 // TODO: COMPILER_RPATH_FLAG and LINKER_RPATH_FLAG have different types
-// defined in vardefs.go; examine why.
+//  defined in vardefs.go; examine why.
 func (s *Suite) Test_MkLine_VariableNeedsQuoting__shellword_part(c *check.C) {
        t := s.Init(c)
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mklinechecker.go
--- a/pkgtools/pkglint/files/mklinechecker.go   Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mklinechecker.go   Thu Feb 21 23:44:55 2019 +0000
@@ -422,7 +422,7 @@
 
        if G.Opts.WarnQuoting && vuc.quoting != VucQuotUnknown && needsQuoting != unknown {
                // FIXME: Why "Shellword" when there's no indication that this is actually a shell type?
-               // It's for splitting the value into tokens, taking "double" and 'single' quotes into account.
+               //  It's for splitting the value into tokens, taking "double" and 'single' quotes into account.
                ck.CheckVaruseShellword(varname, vartype, vuc, varuse.Mod(), needsQuoting)
        }
 
@@ -587,11 +587,11 @@
 // may not be used at load time.
 func (ck MkLineChecker) warnVaruseToolLoadTime(varname string, tool *Tool) {
        // TODO: While using a tool by its variable name may be ok at load time,
-       // doing the same with the plain name of a tool is never ok.
-       // "VAR!= cat" is never guaranteed to call the correct cat.
-       // Even for shell builtins like echo and printf, bmake may decide
-       // to skip the shell and execute the commands via execve, which
-       // means that even echo is not a shell-builtin anymore.
+       //  doing the same with the plain name of a tool is never ok.
+       //  "VAR!= cat" is never guaranteed to call the correct cat.
+       //  Even for shell builtins like echo and printf, bmake may decide
+       //  to skip the shell and execute the commands via execve, which
+       //  means that even echo is not a shell-builtin anymore.
 
        // TODO: Replace "parse time" with "load time" everywhere.
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mklinechecker_test.go
--- a/pkgtools/pkglint/files/mklinechecker_test.go      Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mklinechecker_test.go      Thu Feb 21 23:44:55 2019 +0000
@@ -778,9 +778,9 @@
        // name of another variable, and that variable is not known. Only XKBBASE is known.
        //
        // FIXME: The below warnings are wrong because the MkParser does not recognize the
-       // slash as part of a variable name. Because of that, parsing stops before the $.
-       // The warning "Unclosed Make variable" wrongly assumes that any parse error from
-       // a variable use is because of unclosed braces, which it isn't in this case.h
+       //  slash as part of a variable name. Because of that, parsing stops before the $.
+       //  The warning "Unclosed Make variable" wrongly assumes that any parse error from
+       //  a variable use is because of unclosed braces, which it isn't in this case.
        t.CheckOutputLines(
                "WARN: x11/xkeyboard-config/Makefile:2: Unclosed Make variable starting at \"${${XKBBASE}/xkbcomp...\".",
                "WARN: x11/xkeyboard-config/Makefile:2: Unclosed Make variable starting at \"${${XKBBASE}/xkbcomp...\".")
@@ -810,7 +810,7 @@
        ck := MkLineChecker{mkline}
 
        // FIXME: checkDirectiveCondEmpty cannot know whether it is empty(...) or !empty(...).
-       // It must know that to generate the proper diagnostics.
+       //  It must know that to generate the proper diagnostics.
 
        ck.checkDirectiveCondEmpty(NewMkVarUse("PKGPATH", "Mpattern"))
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mklines.go
--- a/pkgtools/pkglint/files/mklines.go Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mklines.go Thu Feb 21 23:44:55 2019 +0000
@@ -50,7 +50,7 @@
 }
 
 // TODO: Consider defining an interface MkLinesChecker (different name, though, since this one confuses even me)
-// that checks a single topic, like:
+//  that checks a single topic, like:
 //
 //  * PlistVars
 //  * ForLoops
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mklines_test.go
--- a/pkgtools/pkglint/files/mklines_test.go    Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mklines_test.go    Thu Feb 21 23:44:55 2019 +0000
@@ -337,7 +337,7 @@
        // The OSV.NetBSD variable is used implicitly via the OSV variable, therefore no warning.
        t.CheckOutputLines(
                // FIXME: the below warning is wrong; it's ok to have SUBST blocks in all files,
-               // maybe except buildlink3.mk.
+               //  maybe except buildlink3.mk.
                "WARN: determine-defined-variables.mk:12: The variable SUBST_VARS.subst may not be set " +
                        "(only given a default value, or appended to) in this file; " +
                        "it would be ok in Makefile, Makefile.common or options.mk.")
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mkparser_test.go
--- a/pkgtools/pkglint/files/mkparser_test.go   Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mkparser_test.go   Thu Feb 21 23:44:55 2019 +0000
@@ -796,7 +796,7 @@
        }
 
        // TODO: Add callbacks for And, Or, Not if needed.
-       // Especially Not(Empty(VARNAME)) should be an interesting case.
+       //  Especially Not(Empty(VARNAME)) should be an interesting case.
 
        mkline.Cond().Walk(&MkCondCallback{
                Defined: func(varname string) {
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mkshwalker.go
--- a/pkgtools/pkglint/files/mkshwalker.go      Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mkshwalker.go      Thu Feb 21 23:44:55 2019 +0000
@@ -52,7 +52,7 @@
        // arguments individually, arg1 will have index 0 and arg2 will have index 1.
        //
        // TODO: It might be worth defining negative indexes to correspond
-       // to the fields "Cond", "Action", "Else", etc.
+       //  to the fields "Cond", "Action", "Else", etc.
        Index int
 
        Element interface{}
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/mkshwalker_test.go
--- a/pkgtools/pkglint/files/mkshwalker_test.go Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/mkshwalker_test.go Thu Feb 21 23:44:55 2019 +0000
@@ -49,7 +49,7 @@
                walker.Walk(list)
 
                // TODO: Provide a reduced AST that omits all "AndOr with 1 pipelines", etc.
-               // It should look like this:
+               //  It should look like this:
                //
                //  List with 5 andOrs (or generic Commands?)
                //    If with 1 then-branch(es)
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/package.go
--- a/pkgtools/pkglint/files/package.go Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/package.go Thu Feb 21 23:44:55 2019 +0000
@@ -166,9 +166,9 @@
        }
 
        // TODO: Is this still necessary? This code is 20 years old and was introduced
-       // when pkglint loaded the package Makefile including all included files into
-       // a single string. Maybe it makes sense to print the file inclusion hierarchy
-       // to quickly see files that cannot be included because of unresolved variables.
+       //  when pkglint loaded the package Makefile including all included files into
+       //  a single string. Maybe it makes sense to print the file inclusion hierarchy
+       //  to quickly see files that cannot be included because of unresolved variables.
        if G.Opts.DumpMakefile {
                G.out.WriteLine("Whole Makefile (with all included files) follows:")
                for _, line := range allLines.lines.Lines {
@@ -885,9 +885,9 @@
                }
 
                // TODO: Check whether the conditional variables are the same on both places.
-               // Ideally they should match, but there may be some differences in internal
-               // variables, which need to be filtered out before comparing them, like it is
-               // already done with *_MK variables.
+               //  Ideally they should match, but there may be some differences in internal
+               //  variables, which need to be filtered out before comparing them, like it is
+               //  already done with *_MK variables.
        }
 }
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/pkglint.1
--- a/pkgtools/pkglint/files/pkglint.1  Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/pkglint.1  Thu Feb 21 23:44:55 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pkglint.1,v 1.53 2019/02/21 22:49:03 rillig Exp $
+.\"    $NetBSD: pkglint.1,v 1.54 2019/02/21 23:44:55 rillig Exp $
 .\"    From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp
 .\"
 .\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun%itojun.org@localhost>.
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/pkgsrc_test.go
--- a/pkgtools/pkglint/files/pkgsrc_test.go     Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/pkgsrc_test.go     Thu Feb 21 23:44:55 2019 +0000
@@ -161,7 +161,7 @@
        c.Check(G.Pkgsrc.IsBuildDef("VARBASE"), equals, false)
 
        // FIXME: There should be a warning for VARBASE, but G.Pkgsrc.UserDefinedVars
-       // does not contain anything at mklinechecker.go:/UserDefinedVars/.
+       //  does not contain anything at mklinechecker.go:/UserDefinedVars/.
 }
 
 func (s *Suite) Test_Pkgsrc_loadDocChanges__not_found(c *check.C) {
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/shell.go
--- a/pkgtools/pkglint/files/shell.go   Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/shell.go   Thu Feb 21 23:44:55 2019 +0000
@@ -351,7 +351,7 @@
        }
        walker.Callback.Word = func(word *ShToken) {
                // TODO: Try to replace false with true here; it had been set to false
-               // TODO: in 2016 for no apparent reason.
+               //  in 2016 for no apparent reason.
                spc.shline.CheckWord(word.MkText, false, time)
        }
 
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/shell_test.go
--- a/pkgtools/pkglint/files/shell_test.go      Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/shell_test.go      Thu Feb 21 23:44:55 2019 +0000
@@ -568,7 +568,7 @@
        shline.CheckWord(shline.mkline.ShellCommand(), false, RunTime)
 
        // FIXME: Should be parsed correctly. Make passes the dollar through (probably),
-       // and the shell parser should complain about the unfinished string literal.
+       //  and the shell parser should complain about the unfinished string literal.
        t.CheckOutputLines(
                "WARN: filename:1: Internal pkglint error in ShTokenizer.ShAtom at \"$\" (quoting=s).",
                "WARN: filename:1: Internal pkglint error in ShellLine.CheckWord at \"'$\" (quoting=s), rest: $")
@@ -916,7 +916,6 @@
 
        test(108, "$$$$")
 
-       // TODO: The $ variable in line 108 doesn't need quoting.
        t.CheckOutputLines(
                "WARN: module.mk:102: Unquoted shell variable \"from\".",
                "WARN: module.mk:102: Unquoted shell variable \"to\".",
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/util.go
--- a/pkgtools/pkglint/files/util.go    Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/util.go    Thu Feb 21 23:44:55 2019 +0000
@@ -580,7 +580,7 @@
        if mkline != nil && mkline.IsVarassign() {
                lastLine := s.LastDefinition(varname)
                if lastLine != mkline {
-                       mkline.Notef("FirstDefinition differs from LastDefinition in %s.", mkline.RefTo(lastLine))
+                       //mkline.Notef("FirstDefinition differs from LastDefinition in %s.", mkline.RefTo(lastLine))
                }
                return mkline
        }
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/vartype.go
--- a/pkgtools/pkglint/files/vartype.go Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/vartype.go Thu Feb 21 23:44:55 2019 +0000
@@ -105,8 +105,8 @@
 // IsConsideredList returns whether the type is considered a list.
 //
 // FIXME: Explain why this method is necessary. IsList is clear, and MayBeAppendedTo also,
-// but this in-between state needs a decent explanation.
-// Probably MkLineChecker.checkVartype needs to be revisited completely.
+//  but this in-between state needs a decent explanation.
+//  Probably MkLineChecker.checkVartype needs to be revisited completely.
 func (vt *Vartype) IsConsideredList() bool {
        if vt.kindOfList == lkShell {
                return true
diff -r 6edc195233c0 -r d2b9581cc33f pkgtools/pkglint/files/vartypecheck.go
--- a/pkgtools/pkglint/files/vartypecheck.go    Thu Feb 21 22:49:15 2019 +0000
+++ b/pkgtools/pkglint/files/vartypecheck.go    Thu Feb 21 23:44:55 2019 +0000
@@ -610,8 +610,8 @@
        }
 
        if cv.Value != cv.ValueNoVar {
-               // TODO: Activate this warning again, or document why it is not useful.
-               //line.logWarning("Identifiers should be given directly.")
+               // TODO: Activate this warning again, or document why that is not useful.
+               //  line.logWarning("Identifiers should be given directly.")
        }
 
        switch {



Home | Main Index | Thread Index | Old Index