Fix tidy issues

This commit is contained in:
Vadim Petrochenkov 2019-06-30 01:09:59 +03:00
parent ab112cab03
commit 987be89db3
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,8 @@ pub fn check(path: &Path, bad: &mut bool) {
&mut |entry, contents| {
let subpath = entry.path();
if let Some("rs") = subpath.extension().and_then(|e| e.to_str()) {
if contents.contains("#[test]") {
let contents = contents.trim();
if !contents.starts_with("//") && contents.contains("#[test]") {
tidy_error!(
bad,
"{} contains #[test]; libcore tests must be placed inside \