mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 15:26:29 +00:00
Use Clippy with Rust-Analyzer
This commit is contained in:
parent
5aaa8924a6
commit
9459eef032
1 changed files with 4 additions and 5 deletions
|
@ -130,7 +130,7 @@ pub fn init() -> Result<()> {
|
||||||
fs::write("Cargo.toml", updated_cargo_toml)
|
fs::write("Cargo.toml", updated_cargo_toml)
|
||||||
.context("Failed to create the file `rustlings/Cargo.toml`")?;
|
.context("Failed to create the file `rustlings/Cargo.toml`")?;
|
||||||
|
|
||||||
fs::write("rust-analyzer.toml", RATOML)
|
fs::write("rust-analyzer.toml", RUST_ANALYZER_TOML)
|
||||||
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
|
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
|
||||||
|
|
||||||
fs::write(".gitignore", GITIGNORE)
|
fs::write(".gitignore", GITIGNORE)
|
||||||
|
@ -172,10 +172,9 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() {
|
||||||
}
|
}
|
||||||
";
|
";
|
||||||
|
|
||||||
const RATOML: &[u8] = br#"# rust-analyzer configuration file
|
pub const RUST_ANALYZER_TOML: &[u8] = br#"check.command = "clippy"
|
||||||
# DO NOT edit what is already defined.
|
check.extraArgs = ["--profile", "test"]
|
||||||
# You may add new configurations as needed.
|
"#;
|
||||||
check.extraArgs = ["--profile", "test"]"#;
|
|
||||||
|
|
||||||
const GITIGNORE: &[u8] = b"Cargo.lock
|
const GITIGNORE: &[u8] = b"Cargo.lock
|
||||||
target/
|
target/
|
||||||
|
|
Loading…
Reference in a new issue