version 1.59, 2020/06/01 20:49:54 |
version 1.60, 2020/07/01 13:17:41 |
Line 156 func (ck *PlistChecker) checkLine(pline |
|
Line 156 func (ck *PlistChecker) checkLine(pline |
|
|
|
} else if m, cmd, arg := match2(text, `^@([a-z-]+)[\t ]*(.*)`); m { |
} else if m, cmd, arg := match2(text, `^@([a-z-]+)[\t ]*(.*)`); m { |
pline.CheckDirective(cmd, arg) |
pline.CheckDirective(cmd, arg) |
if cmd == "comment" && pline.Location.lineno > 1 { |
if cmd == "comment" && pline.Line.Location.lineno > 1 { |
ck.nonAsciiAllowed = true |
ck.nonAsciiAllowed = true |
} |
} |
|
|
Line 407 func (ck *PlistChecker) checkPathMan(pli |
|
Line 407 func (ck *PlistChecker) checkPathMan(pli |
|
"configured by the pkgsrc user.", |
"configured by the pkgsrc user.", |
"Compression and decompression takes place automatically,", |
"Compression and decompression takes place automatically,", |
"no matter if the .gz extension is mentioned in the PLIST or not.") |
"no matter if the .gz extension is mentioned in the PLIST or not.") |
fix.ReplaceAt(0, len(pline.Text)-len(".gz"), ".gz", "") |
fix.ReplaceAt(0, len(pline.Line.Text)-len(".gz"), ".gz", "") |
fix.Apply() |
fix.Apply() |
} |
} |
} |
} |
Line 528 func (ck *PlistChecker) checkOmf(plines |
|
Line 528 func (ck *PlistChecker) checkOmf(plines |
|
} |
} |
|
|
type PlistLine struct { |
type PlistLine struct { |
*Line |
Line *Line |
// XXX: Why "PLIST.docs" and not simply "docs"? |
// XXX: Why "PLIST.docs" and not simply "docs"? |
conditions []string // e.g. PLIST.docs |
conditions []string // e.g. PLIST.docs |
text string // Line.Text without any conditions of the form ${PLIST.cond} |
text string // Line.Text without any conditions of the form ${PLIST.cond} |
} |
} |
|
|
|
func (pline *PlistLine) Autofix() *Autofix { return pline.Line.Autofix() } |
|
|
|
func (pline *PlistLine) Errorf(format string, args ...interface{}) { |
|
pline.Line.Errorf(format, args...) |
|
} |
|
func (pline *PlistLine) Warnf(format string, args ...interface{}) { |
|
pline.Line.Warnf(format, args...) |
|
} |
|
func (pline *PlistLine) Explain(explanation ...string) { |
|
pline.Line.Explain(explanation...) |
|
} |
|
func (pline *PlistLine) RelLine(other *Line) string { |
|
return pline.Line.RelLine(other) |
|
} |
|
|
func (pline *PlistLine) HasPath() bool { |
func (pline *PlistLine) HasPath() bool { |
return pline.text != "" && plistLineStart.Contains(pline.text[0]) |
return pline.text != "" && plistLineStart.Contains(pline.text[0]) |
} |
} |