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.9
details: https://anonhg.NetBSD.org/pkgsrc/rev/eaf6b3bd46d6
branches: trunk
changeset: 316693:eaf6b3bd46d6
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Dec 17 00:15:39 2018 +0000
description:
pkgtools/pkglint: update to 5.6.9
Changes since 5.6.8:
* In addition to the pkglint binary, the whole pkglint code is installed as
a library, so that other packages can use the code for doing their own
checks on pkgsrc packages, Makefiles, shell programs, or the other file
types from pkgsrc.
* BUILDLINK_*.* may be used in all files.
* Lots of refactorings
diffstat:
pkgtools/pkglint/Makefile | 19 +-
pkgtools/pkglint/PLIST | 116 ++++++-
pkgtools/pkglint/files/alternatives.go | 2 +-
pkgtools/pkglint/files/alternatives_test.go | 2 +-
pkgtools/pkglint/files/autofix.go | 7 +-
pkgtools/pkglint/files/autofix_test.go | 8 +-
pkgtools/pkglint/files/buildlink3.go | 2 +-
pkgtools/pkglint/files/buildlink3_test.go | 2 +-
pkgtools/pkglint/files/category.go | 9 +-
pkgtools/pkglint/files/category_test.go | 2 +-
pkgtools/pkglint/files/check_test.go | 14 +-
pkgtools/pkglint/files/cmd/pkglint/pkglint.go | 10 +
pkgtools/pkglint/files/distinfo.go | 6 +-
pkgtools/pkglint/files/distinfo_test.go | 2 +-
pkgtools/pkglint/files/expecter.go | 4 +-
pkgtools/pkglint/files/expecter_test.go | 2 +-
pkgtools/pkglint/files/files.go | 2 +-
pkgtools/pkglint/files/files_test.go | 2 +-
pkgtools/pkglint/files/fuzzer_test.go | 2 +-
pkgtools/pkglint/files/intqa/testnames.go | 6 +-
pkgtools/pkglint/files/licenses.go | 2 +-
pkgtools/pkglint/files/licenses_test.go | 2 +-
pkgtools/pkglint/files/line.go | 2 +-
pkgtools/pkglint/files/line_test.go | 2 +-
pkgtools/pkglint/files/linechecker.go | 24 +-
pkgtools/pkglint/files/linechecker_test.go | 8 +-
pkgtools/pkglint/files/lines.go | 13 +-
pkgtools/pkglint/files/lines_test.go | 10 +-
pkgtools/pkglint/files/logging.go | 9 +-
pkgtools/pkglint/files/logging_test.go | 2 +-
pkgtools/pkglint/files/mkline.go | 30 +-
pkgtools/pkglint/files/mkline_test.go | 12 +-
pkgtools/pkglint/files/mklinechecker.go | 99 ++--
pkgtools/pkglint/files/mklinechecker_test.go | 59 ++-
pkgtools/pkglint/files/mklines.go | 31 +-
pkgtools/pkglint/files/mklines_test.go | 445 +++++++++++++++--------
pkgtools/pkglint/files/mklines_varalign_test.go | 118 ++++-
pkgtools/pkglint/files/mkparser.go | 284 ++++++++++----
pkgtools/pkglint/files/mkparser_test.go | 457 ++++++++++++++++++-----
pkgtools/pkglint/files/mkshparser.go | 58 ++-
pkgtools/pkglint/files/mkshparser_test.go | 66 ++-
pkgtools/pkglint/files/mkshtypes.go | 112 +++--
pkgtools/pkglint/files/mkshtypes_test.go | 2 +-
pkgtools/pkglint/files/mkshwalker.go | 70 ++-
pkgtools/pkglint/files/mkshwalker_test.go | 49 +-
pkgtools/pkglint/files/mktypes.go | 26 +-
pkgtools/pkglint/files/mktypes_test.go | 11 +-
pkgtools/pkglint/files/options.go | 15 +-
pkgtools/pkglint/files/options_test.go | 29 +-
pkgtools/pkglint/files/package.go | 323 +++++++++++-----
pkgtools/pkglint/files/package_test.go | 293 +++++++-------
pkgtools/pkglint/files/parser.go | 6 +-
pkgtools/pkglint/files/parser_test.go | 65 ++-
pkgtools/pkglint/files/patches.go | 44 +-
pkgtools/pkglint/files/patches_test.go | 30 +-
pkgtools/pkglint/files/pkglint.go | 82 ++-
pkgtools/pkglint/files/pkglint_test.go | 46 +-
pkgtools/pkglint/files/pkgsrc.go | 7 +-
pkgtools/pkglint/files/pkgsrc_test.go | 5 +-
pkgtools/pkglint/files/pkgver/vercmp.go | 56 +-
pkgtools/pkglint/files/plist.go | 31 +-
pkgtools/pkglint/files/plist_test.go | 2 +-
pkgtools/pkglint/files/shell.go | 112 +++--
pkgtools/pkglint/files/shell.y | 34 +-
pkgtools/pkglint/files/shell_test.go | 29 +-
pkgtools/pkglint/files/shtokenizer.go | 8 +-
pkgtools/pkglint/files/shtokenizer_test.go | 20 +-
pkgtools/pkglint/files/shtypes.go | 14 +-
pkgtools/pkglint/files/shtypes_test.go | 2 +-
pkgtools/pkglint/files/substcontext.go | 2 +-
pkgtools/pkglint/files/substcontext_test.go | 2 +-
pkgtools/pkglint/files/testnames_test.go | 3 +-
pkgtools/pkglint/files/textproc/lexer.go | 16 +
pkgtools/pkglint/files/textproc/lexer_test.go | 13 +
pkgtools/pkglint/files/tools.go | 5 +-
pkgtools/pkglint/files/tools_test.go | 2 +-
pkgtools/pkglint/files/toplevel.go | 2 +-
pkgtools/pkglint/files/toplevel_test.go | 2 +-
pkgtools/pkglint/files/util.go | 4 +-
pkgtools/pkglint/files/util_test.go | 2 +-
pkgtools/pkglint/files/var.go | 24 +
pkgtools/pkglint/files/var_test.go | 19 +
pkgtools/pkglint/files/vardefs.go | 11 +-
pkgtools/pkglint/files/vardefs_test.go | 2 +-
pkgtools/pkglint/files/vartype.go | 6 +-
pkgtools/pkglint/files/vartype_test.go | 14 +-
pkgtools/pkglint/files/vartypecheck.go | 57 +-
pkgtools/pkglint/files/vartypecheck_test.go | 10 +-
88 files changed, 2414 insertions(+), 1257 deletions(-)
diffs (truncated from 7643 to 300 lines):
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/Makefile Mon Dec 17 00:15:39 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.560 2018/12/02 23:12:43 rillig Exp $
+# $NetBSD: Makefile,v 1.561 2018/12/17 00:15:39 rillig Exp $
-PKGNAME= pkglint-5.6.8
+PKGNAME= pkglint-5.6.9
CATEGORIES= pkgtools
DISTNAME= tools
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
@@ -27,7 +27,7 @@
SUBST_SED.pkglint+= -e s\|@VERSION@\|${PKGVERSION}\|g
SUBST_SED.pkglint+= -e s\|@BMAKE@\|${MAKE:T:Q}\|g
-EXTRACT_PAX_ARGS= ${"${PKGSRC_RUN_TEST:M[yY][eE][sS]}" :?: -s '|.*/intqa/.*||'}
+EXTRACT_PAX_ARGS= -s ',.*/CVS$$,,' -s ',.*/CVS/.*,,'
WRKSRC.tools= ${WRKSRC}/golang.org/x/tools
WRKSRC.pkglint= ${WRKSRC}/netbsd.org/pkglint
@@ -49,7 +49,9 @@
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} test -vet=off -v ${GO_BUILD_PATTERN}
do-install:
- ${RUN} cd ${WRKDIR} && pax -rw bin/pkglint ${DESTDIR}/${PREFIX}
+ ${RUN} cd ${WRKDIR} && ${PAX} -rw bin/pkglint ${DESTDIR}${PREFIX}
+ ${RUN} cd ${WRKDIR} && ${PAX} -rw src/netbsd.org/pkglint \
+ pkg/${GO_PLATFORM}/netbsd.org/pkglint* ${DESTDIR}${PREFIX}/gopkg
post-install: do-install-man
@@ -71,7 +73,10 @@
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.endif
-.if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
-. include "../../devel/go-check/buildlink3.mk"
-.endif
+# Require devel/go-check even when PKGSRC_RUN_TEST is disabled
+# because netbsd.org/pkglint/intqa depends on it.
+# This package is always installed.
+BUILDLINK_DEPMETHOD.go-check= full
+
+.include "../../devel/go-check/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/PLIST
--- a/pkgtools/pkglint/PLIST Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/PLIST Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,118 @@
-@comment $NetBSD: PLIST,v 1.7 2018/11/07 20:58:22 rillig Exp $
+@comment $NetBSD: PLIST,v 1.8 2018/12/17 00:15:39 rillig Exp $
bin/pkglint
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/getopt.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/histogram.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/intqa.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/licenses.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/pkgver.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/regex.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/textproc.a
+gopkg/pkg/${GO_PLATFORM}/netbsd.org/pkglint/trace.a
+gopkg/src/netbsd.org/pkglint/alternatives.go
+gopkg/src/netbsd.org/pkglint/alternatives_test.go
+gopkg/src/netbsd.org/pkglint/autofix.go
+gopkg/src/netbsd.org/pkglint/autofix_test.go
+gopkg/src/netbsd.org/pkglint/buildlink3.go
+gopkg/src/netbsd.org/pkglint/buildlink3_test.go
+gopkg/src/netbsd.org/pkglint/category.go
+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/distinfo.go
+gopkg/src/netbsd.org/pkglint/distinfo_test.go
+gopkg/src/netbsd.org/pkglint/expecter.go
+gopkg/src/netbsd.org/pkglint/expecter_test.go
+gopkg/src/netbsd.org/pkglint/files.go
+gopkg/src/netbsd.org/pkglint/files_test.go
+gopkg/src/netbsd.org/pkglint/fuzzer_test.go
+gopkg/src/netbsd.org/pkglint/getopt/getopt.go
+gopkg/src/netbsd.org/pkglint/getopt/getopt_test.go
+gopkg/src/netbsd.org/pkglint/histogram/histogram.go
+gopkg/src/netbsd.org/pkglint/histogram/histogram_test.go
+gopkg/src/netbsd.org/pkglint/intqa/ideas.go
+gopkg/src/netbsd.org/pkglint/intqa/testnames.go
+gopkg/src/netbsd.org/pkglint/licenses.go
+gopkg/src/netbsd.org/pkglint/licenses/licenses.go
+gopkg/src/netbsd.org/pkglint/licenses/licenses.y
+gopkg/src/netbsd.org/pkglint/licenses/licenses_test.go
+gopkg/src/netbsd.org/pkglint/licenses/licensesyacc.go
+gopkg/src/netbsd.org/pkglint/licenses/licensesyacc.log
+gopkg/src/netbsd.org/pkglint/licenses_test.go
+gopkg/src/netbsd.org/pkglint/line.go
+gopkg/src/netbsd.org/pkglint/line_test.go
+gopkg/src/netbsd.org/pkglint/linechecker.go
+gopkg/src/netbsd.org/pkglint/linechecker_test.go
+gopkg/src/netbsd.org/pkglint/lines.go
+gopkg/src/netbsd.org/pkglint/lines_test.go
+gopkg/src/netbsd.org/pkglint/logging.go
+gopkg/src/netbsd.org/pkglint/logging_test.go
+gopkg/src/netbsd.org/pkglint/mkline.go
+gopkg/src/netbsd.org/pkglint/mkline_test.go
+gopkg/src/netbsd.org/pkglint/mklinechecker.go
+gopkg/src/netbsd.org/pkglint/mklinechecker_test.go
+gopkg/src/netbsd.org/pkglint/mklines.go
+gopkg/src/netbsd.org/pkglint/mklines_test.go
+gopkg/src/netbsd.org/pkglint/mklines_varalign_test.go
+gopkg/src/netbsd.org/pkglint/mkparser.go
+gopkg/src/netbsd.org/pkglint/mkparser_test.go
+gopkg/src/netbsd.org/pkglint/mkshparser.go
+gopkg/src/netbsd.org/pkglint/mkshparser_test.go
+gopkg/src/netbsd.org/pkglint/mkshtypes.go
+gopkg/src/netbsd.org/pkglint/mkshtypes_test.go
+gopkg/src/netbsd.org/pkglint/mkshwalker.go
+gopkg/src/netbsd.org/pkglint/mkshwalker_test.go
+gopkg/src/netbsd.org/pkglint/mktypes.go
+gopkg/src/netbsd.org/pkglint/mktypes_test.go
+gopkg/src/netbsd.org/pkglint/options.go
+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
+gopkg/src/netbsd.org/pkglint/pkglint.1
+gopkg/src/netbsd.org/pkglint/pkglint.go
+gopkg/src/netbsd.org/pkglint/pkglint_test.go
+gopkg/src/netbsd.org/pkglint/pkgsrc.go
+gopkg/src/netbsd.org/pkglint/pkgsrc_test.go
+gopkg/src/netbsd.org/pkglint/pkgver/vercmp.go
+gopkg/src/netbsd.org/pkglint/pkgver/vercmp_test.go
+gopkg/src/netbsd.org/pkglint/plist.go
+gopkg/src/netbsd.org/pkglint/plist_test.go
+gopkg/src/netbsd.org/pkglint/regex/regex.go
+gopkg/src/netbsd.org/pkglint/shell.go
+gopkg/src/netbsd.org/pkglint/shell.y
+gopkg/src/netbsd.org/pkglint/shell_test.go
+gopkg/src/netbsd.org/pkglint/shellyacc.go
+gopkg/src/netbsd.org/pkglint/shellyacc.log
+gopkg/src/netbsd.org/pkglint/shtokenizer.go
+gopkg/src/netbsd.org/pkglint/shtokenizer_test.go
+gopkg/src/netbsd.org/pkglint/shtypes.go
+gopkg/src/netbsd.org/pkglint/shtypes_test.go
+gopkg/src/netbsd.org/pkglint/substcontext.go
+gopkg/src/netbsd.org/pkglint/substcontext_test.go
+gopkg/src/netbsd.org/pkglint/testnames_test.go
+gopkg/src/netbsd.org/pkglint/textproc/lexer.go
+gopkg/src/netbsd.org/pkglint/textproc/lexer_bench_test.go
+gopkg/src/netbsd.org/pkglint/textproc/lexer_test.go
+gopkg/src/netbsd.org/pkglint/tools.go
+gopkg/src/netbsd.org/pkglint/tools_test.go
+gopkg/src/netbsd.org/pkglint/toplevel.go
+gopkg/src/netbsd.org/pkglint/toplevel_test.go
+gopkg/src/netbsd.org/pkglint/trace/tracing.go
+gopkg/src/netbsd.org/pkglint/trace/tracing_test.go
+gopkg/src/netbsd.org/pkglint/util.go
+gopkg/src/netbsd.org/pkglint/util_test.go
+gopkg/src/netbsd.org/pkglint/var.go
+gopkg/src/netbsd.org/pkglint/var_test.go
+gopkg/src/netbsd.org/pkglint/vardefs.go
+gopkg/src/netbsd.org/pkglint/vardefs_test.go
+gopkg/src/netbsd.org/pkglint/vartype.go
+gopkg/src/netbsd.org/pkglint/vartype_test.go
+gopkg/src/netbsd.org/pkglint/vartypecheck.go
+gopkg/src/netbsd.org/pkglint/vartypecheck_test.go
man/cat1/pkglint.0
man/man1/pkglint.1
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/alternatives.go
--- a/pkgtools/pkglint/files/alternatives.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/alternatives.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import "strings"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/alternatives_test.go
--- a/pkgtools/pkglint/files/alternatives_test.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/alternatives_test.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import "gopkg.in/check.v1"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/autofix.go
--- a/pkgtools/pkglint/files/autofix.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/autofix.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,7 +1,6 @@
-package main
+package pkglint
import (
- "fmt"
"io/ioutil"
"netbsd.org/pkglint/regex"
"os"
@@ -182,7 +181,7 @@
// of the actual fix for logging it later when Apply is called.
// Describef may be called multiple times before calling Apply.
func (fix *Autofix) Describef(lineno int, format string, args ...interface{}) {
- fix.actions = append(fix.actions, autofixAction{fmt.Sprintf(format, args...), lineno})
+ fix.actions = append(fix.actions, autofixAction{sprintf(format, args...), lineno})
}
// InsertBefore prepends a line before the current line.
@@ -266,7 +265,7 @@
logFix := G.Logger.IsAutofix()
if logDiagnostic {
- msg := fmt.Sprintf(fix.diagFormat, fix.diagArgs...)
+ msg := sprintf(fix.diagFormat, fix.diagArgs...)
if !logFix {
if fix.diagFormat == AutofixFormat || G.Logger.FirstTime(line.Filename, line.Linenos(), msg) {
line.showSource(G.out)
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/autofix_test.go
--- a/pkgtools/pkglint/files/autofix_test.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/autofix_test.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import (
"gopkg.in/check.v1"
@@ -905,15 +905,15 @@
"",
"\t\thttps://mirror1.sf.net/ https://mirror2.sf.net/directory/",
"",
- "\tThe first URL is missing the directory. To fix this, write",
+ "\tThe first URL is missing the directory. To fix this, write",
"\t\t${MASTER_SITE_SOURCEFORGE:=directory/}.",
"",
"\tExample: -l${LIBS} expands to",
"",
"\t\t-llib1 lib2",
"",
- "\tThe second library is missing the -l. To fix this, write",
- "\t${LIBS:@lib@-l${lib}@}.",
+ "\tThe second library is missing the -l. To fix this, write",
+ "\t${LIBS:S,^,-l,}.",
"")
}
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/buildlink3.go
--- a/pkgtools/pkglint/files/buildlink3.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/buildlink3.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import (
"netbsd.org/pkglint/pkgver"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/buildlink3_test.go
--- a/pkgtools/pkglint/files/buildlink3_test.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/buildlink3_test.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import "gopkg.in/check.v1"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/category.go
--- a/pkgtools/pkglint/files/category.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/category.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,9 +1,6 @@
-package main
+package pkglint
-import (
- "fmt"
- "netbsd.org/pkglint/textproc"
-)
+import "netbsd.org/pkglint/textproc"
func CheckdirCategory(dir string) {
if trace.Tracing {
@@ -34,7 +31,7 @@
_ = lex.NextBytesSet(valid)
ch := lex.NextByteSet(invalid)
if ch != -1 {
- uni += fmt.Sprintf(" %U", ch)
+ uni += sprintf(" %U", ch)
}
}
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/category_test.go
--- a/pkgtools/pkglint/files/category_test.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/category_test.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
-package main
+package pkglint
import "gopkg.in/check.v1"
diff -r 0cd083bcce2a -r eaf6b3bd46d6 pkgtools/pkglint/files/check_test.go
--- a/pkgtools/pkglint/files/check_test.go Sun Dec 16 23:46:44 2018 +0000
+++ b/pkgtools/pkglint/files/check_test.go Mon Dec 17 00:15:39 2018 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index