use crate::languages::spec::{DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec};
pub static CLIPPY: ToolSpec = ToolSpec {
name: "clippy",
command: &["cargo", "clippy", "--message-format", "json", "--quiet"],
local_paths: &[],
config_files: &["Cargo.toml"],
config_flag: None,
output_format: OutputFormat::Cargo,
diagnostics_stream: DiagnosticsStream::Stdout,
timeout_secs: 1_800,
timeout_context: Some(", including its Cargo build-lock wait"),
establishes_compilation: true,
serial_in_repository: true,
accepts_files: false,
};
pub static RUST_LANG: LanguageSupport = LanguageSupport {
name: "rust",
display_name: "Rust",
extensions: &[".rs"],
filenames: &[],
filename_prefixes: &[],
tools: &[&CLIPPY],
conventions: &[
"unwrap/expect on values that can legitimately be None or Err",
"unsafe blocks, and whether their invariants are documented",
"Unnecessary clones and allocations in hot paths",
"Send/Sync correctness for types crossing threads",
],
vendored_dirs: &["target"],
};
pub(crate) static FAMILY: &[&LanguageSupport] = &[&RUST_LANG];