Auto merge of #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.
This commit is contained in:
bors 2023-08-21 08:06:50 +00:00
commit 9b3d03408c
3 changed files with 10 additions and 10 deletions

View File

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

View File

@ -173,18 +173,18 @@ For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`
-- --
Specifies the working directory for running checks. Specifies the working directory for running checks.
- "workspace": run checks for workspaces in the corresponding workspaces' root directories. - "workspace": run checks for workspaces in the corresponding workspaces' root directories.
This falls back to "root" if `#rust-analyzer.cargo.checkOnSave.invocationStrategy#` is set to `once`. This falls back to "root" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.
- "root": run checks in the project's root directory. - "root": run checks in the project's root directory.
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#` This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
is set. is set.
-- --
[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`):: [[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`)::
+ +
-- --
Specifies the invocation strategy to use when running the checkOnSave command. Specifies the invocation strategy to use when running the check command.
If `per_workspace` is set, the command will be executed for each workspace. If `per_workspace` is set, the command will be executed for each workspace.
If `once` is set, the command will be executed once. If `once` is set, the command will be executed once.
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#` This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
is set. is set.
-- --
[[rust-analyzer.check.noDefaultFeatures]]rust-analyzer.check.noDefaultFeatures (default: `null`):: [[rust-analyzer.check.noDefaultFeatures]]rust-analyzer.check.noDefaultFeatures (default: `null`)::

View File

@ -715,7 +715,7 @@
"uniqueItems": true "uniqueItems": true
}, },
"rust-analyzer.check.invocationLocation": { "rust-analyzer.check.invocationLocation": {
"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.", "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.",
"default": "workspace", "default": "workspace",
"type": "string", "type": "string",
"enum": [ "enum": [
@ -728,7 +728,7 @@
] ]
}, },
"rust-analyzer.check.invocationStrategy": { "rust-analyzer.check.invocationStrategy": {
"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.", "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.",
"default": "per_workspace", "default": "per_workspace",
"type": "string", "type": "string",
"enum": [ "enum": [