diff options
author | rillig <rillig@pkgsrc.org> | 2018-12-21 08:05:24 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2018-12-21 08:05:24 +0000 |
commit | bc8ff39f801ab1097b4cbc3adc836a04bac8a04e (patch) | |
tree | 920eaee6b7e03def523a515e00d7455dbfb49f76 /pkgtools/pkglint/files/shell.go | |
parent | d2314bc8f9e1ac341808312cdfd121696af00564 (diff) | |
download | pkgsrc-bc8ff39f801ab1097b4cbc3adc836a04bac8a04e.tar.gz |
pkgtools/pkglint: update to 5.6.10
Changes since 5.6.9:
* ALTERNATIVES files are correctly checked now. Before, pkglint had
suggested to remove the @PREFIX/ from the alternative, which was
wrong and simply didn't work.
* Diagnostics about variable assignments are ordered to report the
left-hand side first and then everything to the right of the
assignment operator.
* The pkglint output is escaped properly to avoid sending unwanted
escape sequences to the terminal.
* The items in .for loops are parsed taking "double" and 'single'
quotes into account since bmake does it in the same way since 2015.
* In DESCR files, overly long lines are only warned about if they
contain a space and therefore can be made shorter.
* In DESCR files, text like ${PREFIX} only gets a note if it refers
to a commonly known pkgsrc variable. This avoids distraction when
a package mentions ${prefix}/bin or ${template.property}.
* Lots of refactorings and small changes.
Diffstat (limited to 'pkgtools/pkglint/files/shell.go')
-rw-r--r-- | pkgtools/pkglint/files/shell.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/shell.go b/pkgtools/pkglint/files/shell.go index a83295704ff..93b20771071 100644 --- a/pkgtools/pkglint/files/shell.go +++ b/pkgtools/pkglint/files/shell.go @@ -10,6 +10,11 @@ import ( // TODO: Can ShellLine and ShellProgramChecker be merged into one type? +// ShellLine is either a line from a Makefile starting with a tab, +// thereby containing shell commands to be executed. +// +// Or it is a variable assignment line from a Makefile with a left-hand +// side variable that is of some shell-like type; see Vartype.IsShell. type ShellLine struct { mkline MkLine } @@ -293,7 +298,9 @@ func (shline *ShellLine) CheckShellCommandLine(shelltext string) { } setE := lexer.SkipString("${RUN}") if !setE { - lexer.NextString("${_PKG_SILENT}${_PKG_DEBUG}") + if lexer.NextString("${_PKG_SILENT}${_PKG_DEBUG}") != "" { + line.Warnf("Use of _PKG_SILENT and _PKG_DEBUG is deprecated. Use ${RUN} instead.") + } } shline.CheckShellCommand(lexer.Rest(), &setE, RunTime) |