aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_flycheck
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-01 17:41:43 +0100
committerAleksey Kladov <[email protected]>2020-04-01 17:41:43 +0100
commita97e5eb85d1a8a2a07663abbd9beaae317fdb24d (patch)
tree32589015b770dc8c9d1c21085dd0c93b6aa2e586 /crates/ra_flycheck
parent1e012eb991da7344f2423ce1447917c3eb388e87 (diff)
Centralize all config
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r--crates/ra_flycheck/src/lib.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs
index 13494a731..f3d6f8f5f 100644
--- a/crates/ra_flycheck/src/lib.rs
+++ b/crates/ra_flycheck/src/lib.rs
@@ -22,12 +22,22 @@ use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic};
22 22
23pub use crate::conv::url_from_path_with_drive_lowercasing; 23pub use crate::conv::url_from_path_with_drive_lowercasing;
24 24
25#[derive(Clone, Debug)] 25#[derive(Clone, Debug, PartialEq, Eq)]
26pub enum FlycheckConfig { 26pub enum FlycheckConfig {
27 CargoCommand { command: String, all_targets: bool, extra_args: Vec<String> }, 27 CargoCommand { command: String, all_targets: bool, extra_args: Vec<String> },
28 CustomCommand { command: String, args: Vec<String> }, 28 CustomCommand { command: String, args: Vec<String> },
29} 29}
30 30
31impl Default for FlycheckConfig {
32 fn default() -> Self {
33 FlycheckConfig::CargoCommand {
34 command: "check".to_string(),
35 all_targets: true,
36 extra_args: Vec::new(),
37 }
38 }
39}
40
31/// Flycheck wraps the shared state and communication machinery used for 41/// Flycheck wraps the shared state and communication machinery used for
32/// running `cargo check` (or other compatible command) and providing 42/// running `cargo check` (or other compatible command) and providing
33/// diagnostics based on the output. 43/// diagnostics based on the output.