Skip to content

Commit

Permalink
misc: revert severity level on allowed project names (#1739)
Browse files Browse the repository at this point in the history
chesedo authored Apr 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7c42c05 commit f8f9817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backends/src/project_name.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ impl ProjectName {

fn is_profanity_free(name: &str) -> bool {
let (_censored, analysis) = Censor::from_str(name).censor_and_analyze();
!analysis.is(Type::SEVERE) // based on existing names, MODERATE_OR_HIGHER seems too strict
!analysis.is(Type::MODERATE_OR_HIGHER)
}

fn is_reserved(name: &str) -> bool {
@@ -118,7 +118,7 @@ mod tests {
"another-valid-project-name",
"x",
] {
assert!(ProjectName::is_valid(name));
assert!(ProjectName::is_valid(name), "'{}' should be valid", name);
}
}

@@ -151,7 +151,7 @@ mod tests {
"shuttleapp",
"",
] {
assert!(!ProjectName::is_valid(name));
assert!(!ProjectName::is_valid(name), "'{}' should be invalid", name);
}
}
}

0 comments on commit f8f9817

Please sign in to comment.