Skip to content

Commit

Permalink
Ignore commented out lines when finding features
Browse files Browse the repository at this point in the history
  • Loading branch information
syvb committed Apr 24, 2021
1 parent 6df26f8 commit e8a143a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ fn map_lib_features(
continue;
}};
}

lazy_static::lazy_static! {
static ref COMMENT_LINE: Regex = Regex::new(r"\s*//").unwrap();
}
// exclude commented out lines
if COMMENT_LINE.is_match(line) {
continue;
}

if let Some((ref name, ref mut f)) = becoming_feature {
if f.tracking_issue.is_none() {
f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none);
Expand Down

0 comments on commit e8a143a

Please sign in to comment.