summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/shell.go
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2019-01-26 16:31:33 +0000
committerrillig <rillig@pkgsrc.org>2019-01-26 16:31:33 +0000
commitf02d0ba4334a6bc37082fe885fd3eb1c80d4329f (patch)
tree36eef9b1e347a8c8450d3139c57a8b6fe35d07d0 /pkgtools/pkglint/files/shell.go
parent9fc70ee81ab7c0f75c7ccad847bb109052a4baaf (diff)
downloadpkgsrc-f02d0ba4334a6bc37082fe885fd3eb1c80d4329f.tar.gz
pkgtools/pkglint: update to 5.6.12
Changes since 5.6.11: * In buildlink3.mk files, print the paths relative to the line, not to the pkgsrc root. * When explaining that a variable cannot be set/used because of wrong permissions, list the permissions. This provides more transparency than just stating that the desired action is not allowed. * When pkglint checks a pkgsrc-wip package, don't warn about malformed lines in doc/CHANGES-* since pkgsrc-wip users typically cannot do anything about these errors. * In profiling mode, not only the code coverage and the performance statistics are dumped, the whole heap is also dumped to see which parts of pkglint consume the most heap memory. Pkglint now needs less heap memory than before, which mainly affects full scans. * The checks for absolute pathnames have gone. They were of questionable value since pkglint has failed to give proper advice on how to fix them properly, at least for the last 12 years. * The check that pkgsrc-wip packages should only use exact CVS Ids (the unexpanded variant) has been disabled again. It occurred about 16000 times but even fixing it wouldn't improve anything since it was mostly a formatting issue without any practical consequences. * Warn about trailing variable modifiers like in ${VAR:S,from,to,extra}. * Properly parse ${VAR:!command!}. * Suggest to replace SUBST_SED with SUBST_VARS where possible, even with complicated shell quoting. Pkglint can autofix most of these overly verbose cases. * Load builtin.mk whenever the corresponding buildlink3.mk file is included. This fixes several warnings about undefined variables (especially for packages using OpenSSL). * Parse .for lines like bmake does since 2015, splitting words like in brk_string. * Optionally show a warning even if it cannot be autofixed by pkglint. This is useful for the SUBST_VARS replacement since even when pkglint cannot automatically replace the code, there are still cases where it can warn at least. * As always, several refactorings.
Diffstat (limited to 'pkgtools/pkglint/files/shell.go')
-rw-r--r--pkgtools/pkglint/files/shell.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/shell.go b/pkgtools/pkglint/files/shell.go
index 33441eb33c1..a137ce0b161 100644
--- a/pkgtools/pkglint/files/shell.go
+++ b/pkgtools/pkglint/files/shell.go
@@ -24,7 +24,7 @@ func NewShellLine(mkline MkLine) *ShellLine {
}
var shellCommandsType = &Vartype{lkNone, BtShellCommands, []ACLEntry{{"*", aclpAllRuntime}}, false}
-var shellWordVuc = &VarUseContext{shellCommandsType, vucTimeUnknown, vucQuotPlain, false}
+var shellWordVuc = &VarUseContext{shellCommandsType, vucTimeUnknown, VucQuotPlain, false}
func (shline *ShellLine) CheckWord(token string, checkQuoting bool, time ToolTime) {
if trace.Tracing {
@@ -621,9 +621,6 @@ func (scc *SimpleCommandChecker) checkRegexReplace() {
cmdname := scc.strcmd.Name
isSubst := false
for _, arg := range scc.strcmd.Args {
- if !isSubst {
- LineChecker{scc.shline.mkline.Line}.CheckAbsolutePathname(arg)
- }
if G.Testing && isSubst && !matches(arg, `"^[\"\'].*[\"\']$`) {
scc.shline.mkline.Warnf("Substitution commands like %q should always be quoted.", arg)
G.Explain(