Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Dry-run functionality #146

Closed
ozkriff opened this issue Sep 17, 2018 · 10 comments
Closed

Dry-run functionality #146

ozkriff opened this issue Sep 17, 2018 · 10 comments

Comments

@ozkriff
Copy link

ozkriff commented Sep 17, 2018

Is something like --dry-run planned? Or rustfix will always require a VCS?

@killercup
Copy link
Member

I'm not sure I understand. What would --dry-run do? Not change the files? Isn't that basically the same as doing cargo check instead of cargo fix, then?

@killercup
Copy link
Member

Oh, and depending on your answer, this seems like an issue better suited for the cargo repository, as the cargo fix tool lives there (cf. https://github.com/rust-lang/cargo/issues?utf8=✓&q=is%3Aissue+label%3ACommand-fix+). This repo only contains the rustfix library.

@Manishearth
Copy link
Member

Manishearth commented Sep 17, 2018 via email

@ozkriff
Copy link
Author

ozkriff commented Sep 17, 2018

From the 1.29 blog post:

The compiler has an API for this, and it only suggests fixing lints that we’re confident recommend correct code.

As far as I understand, not all warnings showed by cargo check are fixed by rustfix.

@killercup
Copy link
Member

Ah, I see, writing the diff is an interesting idea. In theory you can write it to a .patch file, too, then.

Do you want to open this issue on the cargo repo, @ozkriff? Otherwise I can do it (but you probably have some concrete idea and use cases you could describe, too).

@ozkriff
Copy link
Author

ozkriff commented Sep 17, 2018

Do you want to open this issue on the cargo repo, @ozkriff?

👍 Will do in a few minutes.

you probably have some concrete idea and use cases you could describe

Actually, no, I was just asked about this in the comments to russian translation of 1.29 announcement.

@ozkriff
Copy link
Author

ozkriff commented Sep 17, 2018

Done: rust-lang/cargo#6040

@Manishearth
Copy link
Member

I think this library will also need support for doing all this without editing, no?

@killercup
Copy link
Member

@Manishearth nah, all file handling is done in the cargo subcommand

@ehuss
Copy link
Collaborator

ehuss commented Nov 22, 2023

Closing in favor of rust-lang/cargo#6040.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants