mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-21 16:41:01 -05:00
chore(CI): Push the regex lint under a rug
This commit is contained in:
parent
905de9bd8d
commit
34c922509a
2 changed files with 3 additions and 0 deletions
1
build.rs
1
build.rs
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue