-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3961 : use char range methods (not byte offsets) to detect whitespace #6764
Fix #3961 : use char range methods (not byte offsets) to detect whitespace #6764
Conversation
@catamorphism hmm, I had seen that some of the files in |
(in other words, I do not know what |
From discussion with graydon and niko, determined that pp-exact would not be the right thing for this "test case", such as it is, because the output is not expected to match the input here. There may be a way to specify a separate output file that needs to be matched. I'll look it see if I can find that and use it. |
ah maybe pp-exact:output.pp is what I want. |
@brson r? |
…n, r=brson r? (yes, the review request is back, now that I got it building against incom... I mean master!) (Attempting to port from orphaned pull-request #6764 ) Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.) Before applying this change set: -- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect. -- compare B and D do not match A and C. (To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
…p1995 lintcheck: parallelize By default we use a single thread and one target dir as before. If `-j n` is passed, use `n` target dirs and run one clippy in each of them. We need several target dirs because cargo would lock them for a single process otherwise which would prevent the parallelism. `-j 0` makes rayon use $thread_count/2 (which I assume is the number of physical cores of a machine) for the number of threads. Other change: Show output of clippy being compiled when building it for lintcheck (makes it easier to spot compiler errors etc) Show some progress indication in the "Linting... foo 1.2.3" message. Sort crates before linting (previously crates would be split randomly between target dirs, with the sorting, we try to make sure that even crates land in target dir 0 and odd ones in target dir 1 etc..) *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: parallelize lintcheck with rayon
Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.)
Before applying this change set:
-- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect.
-- compare B and D do not match A and C.
(To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)