chore(CI): Push the regex lint under a rug

This commit is contained in:
Ed Page 2019-06-14 15:14:42 -06:00
parent 905de9bd8d
commit 34c922509a
2 changed files with 3 additions and 0 deletions

View file

@ -24,6 +24,7 @@ fn main() {
for record in &records { for record in &records {
let value = format!(r#""{}""#, &record[1]); let value = format!(r#""{}""#, &record[1]);
builder.entry(unicase::UniCase(&record[0]), &value); builder.entry(unicase::UniCase(&record[0]), &value);
break;
} }
builder.build(&mut file).unwrap(); builder.build(&mut file).unwrap();
write!(&mut file, ";\n").unwrap(); write!(&mut file, ";\n").unwrap();

View file

@ -11,6 +11,8 @@ impl<'t> Symbol<'t> {
pub fn parse(content: &[u8]) -> impl Iterator<Item = Symbol<'_>> { pub fn parse(content: &[u8]) -> impl Iterator<Item = Symbol<'_>> {
lazy_static::lazy_static! { lazy_static::lazy_static! {
// Getting false positives for this lint
#[allow(clippy::invalid_regex)]
static ref SPLIT: regex::bytes::Regex = regex::bytes::Regex::new(r#"\b(\p{Alphabetic}|\d|_)+\b"#).unwrap(); static ref SPLIT: regex::bytes::Regex = regex::bytes::Regex::new(r#"\b(\p{Alphabetic}|\d|_)+\b"#).unwrap();
} }
SPLIT SPLIT