Skip to content

Commit e8a143a

Browse files
committed
Ignore commented out lines when finding features
1 parent 6df26f8 commit e8a143a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tools/tidy/src/features.rs

+9
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,15 @@ fn map_lib_features(
423423
continue;
424424
}};
425425
}
426+
427+
lazy_static::lazy_static! {
428+
static ref COMMENT_LINE: Regex = Regex::new(r"\s*//").unwrap();
429+
}
430+
// exclude commented out lines
431+
if COMMENT_LINE.is_match(line) {
432+
continue;
433+
}
434+
426435
if let Some((ref name, ref mut f)) = becoming_feature {
427436
if f.tracking_issue.is_none() {
428437
f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none);

0 commit comments

Comments
 (0)