handle "ignore-" and "only-"

This commit is contained in:
Pietro Albini 2023-03-10 12:22:07 +01:00
parent 55121a9c46
commit 8eb3def446
No known key found for this signature in database
GPG Key ID: CD76B35F7734769E

View File

@ -697,6 +697,12 @@ impl Config {
let (name, comment) =
line.split_once(&[':', ' ']).map(|(l, c)| (l, Some(c))).unwrap_or((line, None));
// Some of the matchers might be "" depending on what the target information is. To avoid
// problems we outright reject empty directives.
if name == "" {
return ParsedNameDirective::invalid();
}
let mut outcome = MatchOutcome::Invalid;
let mut message = None;