Skip to main content

warn_literal_patterns

Function warn_literal_patterns 

Source
fn warn_literal_patterns(config: &Config)
Expand description

Warns where a pattern option holds text that reads as a plain name.

These options are regular expressions, so an unescaped dot matches any character and an entry typed as a plain name therefore matches more than it names. Only escaping is suggested: whether the pattern should also be anchored depends on what the operator meant it to match, and a substring match is sometimes the intent.