]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #40653 - frewsxcv:tidy-handling, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 9 Apr 2017 23:23:11 +0000 (23:23 +0000)
committerbors <bors@rust-lang.org>
Sun, 9 Apr 2017 23:23:11 +0000 (23:23 +0000)
A couple minor improvements for tidy error handling.

None

1  2 
src/tools/tidy/src/pal.rs
src/tools/tidy/src/style.rs

Simple merge
index 012301299e0c54029a72cf35de4663bab803ff87,081390eb93ca482d605aceb5efda82950a6cba47..d545a03aa5ccb8f7d440800187f30cfd57506f78
@@@ -110,11 -110,9 +110,10 @@@ pub fn check(path: &Path, bad: &mut boo
          let skip_cr = contents.contains("ignore-tidy-cr");
          let skip_tab = contents.contains("ignore-tidy-tab");
          let skip_length = contents.contains("ignore-tidy-linelength");
 +        let skip_end_whitespace = contents.contains("ignore-tidy-end-whitespace");
          for (i, line) in contents.split("\n").enumerate() {
              let mut err = |msg: &str| {
-                 println!("{}:{}: {}", file.display(), i + 1, msg);
-                 *bad = true;
+                 tidy_error!(bad, "{}:{}: {}", file.display(), i + 1, msg);
              };
              if !skip_length && line.chars().count() > COLS
                  && !long_line_is_ok(line) {