diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-26 17:12:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-26 17:12:17 +0100 |
commit | 568ef921acb8d35eed434089c1b1947c585c3f4c (patch) | |
tree | a3dfa55e7fadcb7e7e8299ce03d9f7beaee4a79b /xtask | |
parent | 2f7d1f10c1614d9448604da5c105b75c43cc6f2b (diff) | |
parent | a5cbd8d5e8aca0d0d8dde175ba13bfa995a753c0 (diff) |
Merge #2077
2077: check style for assist docs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/codegen/gen_assists_docs.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<Vec<Assist>> { | |||
52 | ); | 52 | ); |
53 | 53 | ||
54 | let doc = take_until(lines.by_ref(), "```").trim().to_string(); | 54 | let doc = take_until(lines.by_ref(), "```").trim().to_string(); |
55 | assert!( | ||
56 | doc.chars().next().unwrap().is_ascii_uppercase() && doc.ends_with("."), | ||
57 | "\n\n{}: assist docs should be proper sentences, with capitalization and a full stop at the end.\n\n{}\n\n", | ||
58 | id, doc, | ||
59 | ); | ||
60 | |||
55 | let before = take_until(lines.by_ref(), "```"); | 61 | let before = take_until(lines.by_ref(), "```"); |
56 | 62 | ||
57 | assert_eq!(lines.next().unwrap().as_str(), "->"); | 63 | assert_eq!(lines.next().unwrap().as_str(), "->"); |