-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #107757 - clubby789:setup-settings-json, r=jyn514
Allow automatically creating vscode `settings.json` with `x setup` Closes #107703
- Loading branch information
Showing
3 changed files
with
161 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use super::{SETTINGS_HASHES, VSCODE_SETTINGS}; | ||
use sha2::Digest; | ||
|
||
#[test] | ||
fn check_matching_settings_hash() { | ||
let mut hasher = sha2::Sha256::new(); | ||
hasher.update(&VSCODE_SETTINGS); | ||
let hash = hex::encode(hasher.finalize().as_slice()); | ||
assert_eq!( | ||
&hash, | ||
SETTINGS_HASHES.last().unwrap(), | ||
"Update `SETTINGS_HASHES` with the new hash of `src/etc/vscode_settings.json`" | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"rust-analyzer.checkOnSave.overrideCommand": [ | ||
"python3", | ||
"x.py", | ||
"check", | ||
"--json-output" | ||
], | ||
"rust-analyzer.linkedProjects": ["src/bootstrap/Cargo.toml", "Cargo.toml"], | ||
"rust-analyzer.rustfmt.overrideCommand": [ | ||
"./build/host/rustfmt/bin/rustfmt", | ||
"--edition=2021" | ||
], | ||
"rust-analyzer.procMacro.server": "./build/host/stage0/libexec/rust-analyzer-proc-macro-srv", | ||
"rust-analyzer.procMacro.enable": true, | ||
"rust-analyzer.cargo.buildScripts.enable": true, | ||
"rust-analyzer.cargo.buildScripts.invocationLocation": "root", | ||
"rust-analyzer.cargo.buildScripts.invocationStrategy": "once", | ||
"rust-analyzer.cargo.buildScripts.overrideCommand": [ | ||
"python3", | ||
"x.py", | ||
"check", | ||
"--json-output" | ||
], | ||
"rust-analyzer.cargo.sysroot": "./build/host/stage0-sysroot", | ||
"rust-analyzer.rustc.source": "./Cargo.toml" | ||
} |