summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-04-06 09:49:48 +0900
committerYuki Okushi <jtitor@2k36.org>2021-04-06 09:49:48 +0900
commit703924fad8ee3f7daa3510dbdd7adcc839dce421 (patch)
treef90cd2176ec5797b4cacf5cc22b06f5d87bdb021 /ci
parent3a31a5f42c373c504429c1a3add89053f0f99473 (diff)
downloadrust-libc-703924fad8ee3f7daa3510dbdd7adcc839dce421.tar.gz
Only run the cfg check for single lines
Diffstat (limited to 'ci')
-rw-r--r--ci/style.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ci/style.rs b/ci/style.rs
index b0b6d124f4..4bd947bb13 100644
--- a/ci/style.rs
+++ b/ci/style.rs
@@ -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");
}