chore: add for_loops_forbidden_only parser and switch to fat LTO in release profile
This commit is contained in:
@@ -11,7 +11,7 @@ pub fn parse(stats: &mut Stats, text: &str) {
|
||||
{
|
||||
stats.sentence_count += 1;
|
||||
for word in sentence
|
||||
.split_whitespace()
|
||||
.split_ascii_whitespace()
|
||||
.map(|s| s.trim())
|
||||
.filter(|s| !s.is_empty())
|
||||
{
|
||||
@@ -21,17 +21,15 @@ pub fn parse(stats: &mut Stats, text: &str) {
|
||||
for char in word.chars() {
|
||||
if char.is_numeric() {
|
||||
stats.numeric_count += 1;
|
||||
//TODO are numbers capitalized or not? I don't know!
|
||||
}
|
||||
if !char.is_ascii_uppercase() {
|
||||
all_capitalized = false;
|
||||
} else if !char.is_ascii_uppercase() {
|
||||
all_capitalized = false;
|
||||
}
|
||||
}
|
||||
if all_capitalized {
|
||||
stats.capitalized_count += 1;
|
||||
}
|
||||
let lowercase_word = word.to_lowercase();
|
||||
if FORBIDDEN_WORDS.contains(&lowercase_word) {
|
||||
if FORBIDDEN_WORDS.contains(&word.to_lowercase()) {
|
||||
stats.forbidden_count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user