]>
git.proxmox.com Git - rustc.git/blob - src/tools/tidy/src/rustdoc_gui_tests.rs
1 //! Tidy check to ensure that rustdoc GUI tests start with a small description.
5 pub fn check(path
: &Path
, bad
: &mut bool
) {
7 &path
.join("rustdoc-gui"),
9 // If there is no extension, it's very likely a folder and we want to go into it.
10 p
.extension().map(|e
| e
!= "goml").unwrap_or(false)
12 &mut |entry
, content
| {
13 for line
in content
.lines() {
14 if !line
.starts_with("// ") {
17 "{}: rustdoc-gui tests must start with a small description",
18 entry
.path().display(),
21 } else if line
.starts_with("// ") {
22 let parts
= line
[2..].trim();
23 // We ignore tidy comments.
24 if parts
.starts_with("// tidy-") {