From a5cbd8d5e8aca0d0d8dde175ba13bfa995a753c0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Oct 2019 19:08:13 +0300 Subject: check style for assist docs --- xtask/src/codegen/gen_assists_docs.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xtask/src') diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs index 2ca7cda63..8dca2ed06 100644 --- a/xtask/src/codegen/gen_assists_docs.rs +++ b/xtask/src/codegen/gen_assists_docs.rs @@ -52,6 +52,12 @@ fn collect_assists() -> Result> { ); 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(), "->"); -- cgit v1.2.3