mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
check style for assist docs
This commit is contained in:
parent
2f7d1f10c1
commit
a5cbd8d5e8
10 changed files with 165 additions and 15 deletions
|
@ -52,6 +52,12 @@ fn collect_assists() -> Result<Vec<Assist>> {
|
|||
);
|
||||
|
||||
let doc = take_until(lines.by_ref(), "```").trim().to_string();
|
||||
assert!(
|
||||
doc.chars().next().unwrap().is_ascii_uppercase() && doc.ends_with("."),
|
||||
"\n\n{}: assist docs should be proper sentences, with capitalization and a full stop at the end.\n\n{}\n\n",
|
||||
id, doc,
|
||||
);
|
||||
|
||||
let before = take_until(lines.by_ref(), "```");
|
||||
|
||||
assert_eq!(lines.next().unwrap().as_str(), "->");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue