forked from extern/nushell
Test command names and search terms for redundancy (#6380)
* Test commands for proper names and search terms Assert that the `Command.name()` is equal to `Signature.name` Check that search terms are not just substrings of the command name as they would not help finding the command. * Clean up search terms Remove redundant terms that just replicate the command name. Try to eliminate substring between search terms, clean up where necessary.
This commit is contained in:
committed by
GitHub
parent
ef26d539a7
commit
0afe1e4e67
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["average", "mean"]
|
||||
vec!["average", "mean", "statistics"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -19,7 +19,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["ceiling"]
|
||||
vec!["ceiling", "round up", "rounding", "integer"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -19,7 +19,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["floor"]
|
||||
vec!["round down", "rounding", "integer"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -23,7 +23,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["middle", "median"]
|
||||
vec!["middle", "statistics"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -23,7 +23,14 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["SD", "standard", "deviation", "dispersion", "variation"]
|
||||
vec![
|
||||
"SD",
|
||||
"standard",
|
||||
"deviation",
|
||||
"dispersion",
|
||||
"variation",
|
||||
"statistics",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["deviation", "dispersion", "variance", "variation"]
|
||||
vec!["deviation", "dispersion", "variation", "statistics"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
Reference in New Issue
Block a user