Skip to content

Commit 9b3d034

Browse files
committed
Auto merge of rust-lang#15490 - RalfJung:check-invocation-help, r=Veykril
fix help text for rust-analyzer.check.invocation{Strategy,Location} I highly doubt that `check.invocationLocation` only has an effect if `cargo.buildScripts.overrideCommand` is set -- looks like a copy-paste mistake from `buildScripts.invocationLocation` to me.
2 parents a3892f0 + 887cc48 commit 9b3d034

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

crates/rust-analyzer/src/config.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ config_data! {
157157
/// Specifies the working directory for running checks.
158158
/// - "workspace": run checks for workspaces in the corresponding workspaces' root directories.
159159
// FIXME: Ideally we would support this in some way
160-
/// This falls back to "root" if `#rust-analyzer.cargo.checkOnSave.invocationStrategy#` is set to `once`.
160+
/// This falls back to "root" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.
161161
/// - "root": run checks in the project's root directory.
162-
/// This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
162+
/// This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
163163
/// is set.
164164
check_invocationLocation | checkOnSave_invocationLocation: InvocationLocation = "\"workspace\"",
165-
/// Specifies the invocation strategy to use when running the checkOnSave command.
165+
/// Specifies the invocation strategy to use when running the check command.
166166
/// If `per_workspace` is set, the command will be executed for each workspace.
167167
/// If `once` is set, the command will be executed once.
168-
/// This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
168+
/// This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
169169
/// is set.
170170
check_invocationStrategy | checkOnSave_invocationStrategy: InvocationStrategy = "\"per_workspace\"",
171171
/// Whether to pass `--no-default-features` to Cargo. Defaults to

docs/user/generated_config.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`
173173
--
174174
Specifies the working directory for running checks.
175175
- "workspace": run checks for workspaces in the corresponding workspaces' root directories.
176-
This falls back to "root" if `#rust-analyzer.cargo.checkOnSave.invocationStrategy#` is set to `once`.
176+
This falls back to "root" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.
177177
- "root": run checks in the project's root directory.
178-
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
178+
This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
179179
is set.
180180
--
181181
[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`)::
182182
+
183183
--
184-
Specifies the invocation strategy to use when running the checkOnSave command.
184+
Specifies the invocation strategy to use when running the check command.
185185
If `per_workspace` is set, the command will be executed for each workspace.
186186
If `once` is set, the command will be executed once.
187-
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
187+
This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
188188
is set.
189189
--
190190
[[rust-analyzer.check.noDefaultFeatures]]rust-analyzer.check.noDefaultFeatures (default: `null`)::

editors/code/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@
715715
"uniqueItems": true
716716
},
717717
"rust-analyzer.check.invocationLocation": {
718-
"markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.cargo.checkOnSave.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`\nis set.",
718+
"markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.",
719719
"default": "workspace",
720720
"type": "string",
721721
"enum": [
@@ -728,7 +728,7 @@
728728
]
729729
},
730730
"rust-analyzer.check.invocationStrategy": {
731-
"markdownDescription": "Specifies the invocation strategy to use when running the checkOnSave command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`\nis set.",
731+
"markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.",
732732
"default": "per_workspace",
733733
"type": "string",
734734
"enum": [

0 commit comments

Comments
 (0)