drep/languages/definitions/
elixir.rs1use crate::languages::spec::{
4 DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
5};
6
7pub static CREDO: ToolSpec = ToolSpec {
13 name: "credo",
14 command: &["mix", "credo", "--format", "json"],
15 local_paths: &[],
16 config_files: &[".credo.exs"],
17 config_flag: None,
18 output_format: OutputFormat::Credo,
19 diagnostics_stream: DiagnosticsStream::Stdout,
20 timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
21 timeout_context: None,
22 establishes_compilation: false,
23 serial_in_repository: false,
24 accepts_files: true,
25};
26
27pub static ELIXIR: LanguageSupport = LanguageSupport {
36 name: "elixir",
37 display_name: "Elixir",
38 extensions: &[".ex", ".exs"],
39 filenames: &[],
40 filename_prefixes: &[],
41 tools: &[&CREDO],
42 conventions: &[
43 "Pattern matches with no fallback clause, crashing on unexpected shapes",
44 "Non-tail recursion over unbounded lists",
45 "Atoms built from untrusted input",
46 "GenServer calls that deadlock against themselves",
47 "Unhandled messages accumulating in a mailbox",
48 ],
49 vendored_dirs: &["_build"],
50};
51
52pub(crate) static FAMILY: &[&LanguageSupport] = &[&ELIXIR];