Only run the cfg check for single lines
This commit is contained in:
parent
3a31a5f42c
commit
703924fad8
|
@ -125,8 +125,7 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
|
|||
if line.len() > 80 {
|
||||
err.error(path, i, "line longer than 80 chars");
|
||||
}
|
||||
// This doesn't work any more due to rustfmt changes
|
||||
/*if line.contains("#[cfg(") && !line.contains(" if ")
|
||||
if line.contains("#[cfg(") && line.contains(']') && !line.contains(" if ")
|
||||
&& !(line.contains("target_endian") ||
|
||||
line.contains("target_arch"))
|
||||
{
|
||||
|
@ -134,7 +133,7 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
|
|||
err.error(path, i, "use cfg_if! and submodules \
|
||||
instead of #[cfg]");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) {
|
||||
err.error(path, i, "impl ::Copy and ::Clone manually");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue