mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Pass flycheck extra args when running build scripts
This commit is contained in:
parent
70e10deee8
commit
cfc9d5cd3b
@ -67,6 +67,7 @@ impl WorkspaceBuildScripts {
|
|||||||
let mut cmd = Command::new(toolchain::cargo());
|
let mut cmd = Command::new(toolchain::cargo());
|
||||||
|
|
||||||
cmd.args(["check", "--quiet", "--workspace", "--message-format=json"]);
|
cmd.args(["check", "--quiet", "--workspace", "--message-format=json"]);
|
||||||
|
cmd.args(&config.extra_args);
|
||||||
|
|
||||||
// --all-targets includes tests, benches and examples in addition to the
|
// --all-targets includes tests, benches and examples in addition to the
|
||||||
// default lib and bins. This is an independent concept from the --target
|
// default lib and bins. This is an independent concept from the --target
|
||||||
|
@ -105,6 +105,8 @@ pub struct CargoConfig {
|
|||||||
pub wrap_rustc_in_build_scripts: bool,
|
pub wrap_rustc_in_build_scripts: bool,
|
||||||
/// The command to run instead of `cargo check` for building build scripts.
|
/// The command to run instead of `cargo check` for building build scripts.
|
||||||
pub run_build_script_command: Option<Vec<String>>,
|
pub run_build_script_command: Option<Vec<String>>,
|
||||||
|
/// Extra args to pass to the cargo command.
|
||||||
|
pub extra_args: Vec<String>,
|
||||||
/// Extra env vars to set when invoking the cargo command
|
/// Extra env vars to set when invoking the cargo command
|
||||||
pub extra_env: FxHashMap<String, String>,
|
pub extra_env: FxHashMap<String, String>,
|
||||||
pub invocation_strategy: InvocationStrategy,
|
pub invocation_strategy: InvocationStrategy,
|
||||||
|
@ -1157,6 +1157,7 @@ impl Config {
|
|||||||
InvocationLocation::Workspace => project_model::InvocationLocation::Workspace,
|
InvocationLocation::Workspace => project_model::InvocationLocation::Workspace,
|
||||||
},
|
},
|
||||||
run_build_script_command: self.data.cargo_buildScripts_overrideCommand.clone(),
|
run_build_script_command: self.data.cargo_buildScripts_overrideCommand.clone(),
|
||||||
|
extra_args: self.data.check_extraArgs.clone(),
|
||||||
extra_env: self.data.cargo_extraEnv.clone(),
|
extra_env: self.data.cargo_extraEnv.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user