diff options
Diffstat (limited to 'crates/ra_flycheck')
-rw-r--r-- | crates/ra_flycheck/src/lib.rs | 12 |
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 | ||
23 | pub use crate::conv::url_from_path_with_drive_lowercasing; | 23 | pub use crate::conv::url_from_path_with_drive_lowercasing; |
24 | 24 | ||
25 | #[derive(Clone, Debug)] | 25 | #[derive(Clone, Debug, PartialEq, Eq)] |
26 | pub enum FlycheckConfig { | 26 | pub 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 | ||
31 | impl 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. |