Instead of panicking when we try to look closer at the empty pattern, return something like `invalid pattern "(?d)" in ignore file: missing pattern`.
This commit is contained in:
@@ -422,6 +422,10 @@ func parseLine(line string) ([]Pattern, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if line == "" {
|
||||
return nil, errors.New("missing pattern")
|
||||
}
|
||||
|
||||
if pattern.result.IsCaseFolded() {
|
||||
line = strings.ToLower(line)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user