From a43ccb0b9b8b95607b10daaa18e2341f2615a729 Mon Sep 17 00:00:00 2001 From: varkor Date: Mon, 22 Apr 2019 16:56:47 +0100 Subject: [PATCH] Disallow double trailing newlines in tidy --- src/tools/tidy/src/style.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index a4321cd757129..eeddddfb5de61 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -159,7 +159,7 @@ pub fn check(path: &Path, bad: &mut bool) { } match trailing_new_lines { 0 => tidy_error!(bad, "{}: missing trailing newline", file.display()), - 1 | 2 => {} + 1 => {} n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n), }; })