Skip to content

Commit

Permalink
chore(CI): Push the regex lint under a rug
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jun 14, 2019
1 parent 905de9b commit 34c9225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn main() {
for record in &records {
let value = format!(r#""{}""#, &record[1]);
builder.entry(unicase::UniCase(&record[0]), &value);
break;
}
builder.build(&mut file).unwrap();
write!(&mut file, ";\n").unwrap();
Expand Down
2 changes: 2 additions & 0 deletions src/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ impl<'t> Symbol<'t> {

pub fn parse(content: &[u8]) -> impl Iterator<Item = Symbol<'_>> {
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();
}
SPLIT
Expand Down

0 comments on commit 34c9225

Please # to comment.