Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rust-lang/rustfix
Automatically apply the suggestions made by rustc
https://github.com/rust-lang/rustfix
cargo cli hacktoberfest rust
Last synced: 3 days ago
JSON representation
Automatically apply the suggestions made by rustc
- Host: GitHub
- URL: https://github.com/rust-lang/rustfix
- Owner: rust-lang
- License: apache-2.0
- Archived: true
- Created: 2016-07-07T09:24:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T03:39:37.000Z (about 1 year ago)
- Last Synced: 2024-05-20T22:48:05.595Z (8 months ago)
- Topics: cargo, cli, hacktoberfest, rust
- Language: Rust
- Homepage:
- Size: 380 KB
- Stars: 857
- Watchers: 19
- Forks: 63
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust-cn - rust-lang-nursery/rustfix - ci.org/killercup/rustfix.svg?branch=master">](https://travis-ci.org/killercup/rustfix) (Development tools / Web Servers)
- awesome-rust-cn - rust-lang/rustfix
- awesome-rust-zh - rust-lang-nursery/rustfix - 自动应用 rustc 提出的建议[<img src="https://api.travis-ci.org/killercup/rustfix.svg?branch=master">](https://travis-ci.org/killercup/rustfix) (开发工具 / Web 服务器)
README
# ⚠️ Rustfix has moved
The rustfix crate has moved to .
Any issues about the `rustfix` library or `cargo fix` should be filed at .
Any issues about the suggestions generated by the compiler should be filed at .----
# rustfix
[![Latest Version](https://img.shields.io/crates/v/rustfix.svg)](https://crates.io/crates/rustfix)
[![Rust Documentation](https://docs.rs/rustfix/badge.svg)](https://docs.rs/rustfix)Rustfix is a library defining useful structures that represent fix suggestions from rustc.
## Current status
Currently, rustfix is split into two crates:
- `rustfix`, a library for consuming and applying suggestions in the format that `rustc` outputs (this crate)
- `cargo-fix`, a binary that works as cargo subcommand and that end users will use to fix their code (maintained in the [cargo](https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/commands/fix.rs) repo).The library (and therefore this repo) is considered largely feature-complete. This is because:
* There is no compiler or even rust-specific logic here
* New lints and suggestions come from the Rust compiler (and external lints, like [clippy]).
* `rustfix` doesn't touch the filesystem to implement fixes, or read from disk[clippy]: https://github.com/rust-lang-nursery/rust-clippy
## Installation
`cargo fix` is a built-in command in Cargo since Rust 1.29. There is no need to install it separately from crates.io.
To use the rustfix library for use in your own fix project, add it to your `Cargo.toml`.
## Using `cargo fix --edition` to transition to Rust 2021
Instructions on how to use this tool to transition a crate to Rust 2021 can be
found [in the Rust Edition Guide.](https://rust-lang-nursery.github.io/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html)## License
Licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.