check style for assist docs

This commit is contained in:
Aleksey Kladov 2019-10-26 19:08:13 +03:00
parent 2f7d1f10c1
commit a5cbd8d5e8
10 changed files with 165 additions and 15 deletions

View file

@ -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(), "->");