-
Notifications
You must be signed in to change notification settings - Fork 62
Conversation
rewrote the branches a bit, so this is now based on #96 |
To allow us to add more fixture tests modes soon.
Also refactors the test setup to finally run as many tests as possible and give useful errors.
Basically the same as the one for rustfix proper, but with the required cargo setup in place, too. We should replace this one with a 'phase 1' lint (that makes required changes to migrate to the 2018 edition) once one is available.
We should late on pass `-W rust_2018_migration` automatically when there are lints present in this lint group.
Nice! I think we're still thinking of adding an |
@alexcrichton yes! This PR is just about having tests for each of the three modes (migration-to-2018, on-2018, yolo). We should add an |
While it's nice to have this in rustfix' test suite, once we have a rustfix with machine-applicable-only flag, we should really upgrade rustc's compiletest to use that and make sure to add rustfix tests for each of the lints in rust-lang/rust#50068 in the compiler itself. |
Ok cool makes sense to me. I'm also less certain myself about what those three modes are, could you detail them a bit more? Also, are you thinking that this should land ahead of other PRs to get it into rust-lang/rust sooner? |
Sure. The "three modes" are basically the same as the "groups" we defined here, plus "fix all suggestions":
This is only an internal grouping for rustfix' tests! I want to ensure that we have integration tests covering what is pretty essential to rustfix -- doing edition related fixes :) |
@killercup ah ok, interesting! I figured we were just gonna always leave rustfix in "fix all warnings you can" mode and otherwise the flags would simply indicate what lints the tool explicitly enables. For example I figured that when you switch to the 2018 edition via Are you thinking we'd explicitly ignore some lints though and not apply fixes that we automatically look at? |
Sorry for the confusion! This PR might not actually make much sense -- I just wanted to have a quick way of testing the edition lints. But we should do that in rustc directly. Let's close this PR. I'll open a new one that adds the We should add one end-to-end test soon, though: One that goes from "compiles on 2015" through
Nah, we should trust what the compiler tells us. Forget everything you saw here. |
Ok that all sounds great to me! |
This adds a first test for edition lints (cf. #62). I'll open another PR for filtering by machine applicability in a minute.
Note: Requires custom rustc built with rust-lang/rust#50454
cc @Manishearth