drep/languages/definitions/
shell.rs1use crate::languages::spec::{
4 DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
5};
6
7pub static SHELLCHECK: ToolSpec = ToolSpec {
12 name: "shellcheck",
13 command: &["shellcheck", "-f", "json"],
14 local_paths: &[],
15 config_files: &[".shellcheckrc"],
16 config_flag: None,
17 output_format: OutputFormat::Shellcheck,
18 diagnostics_stream: DiagnosticsStream::Stdout,
19 timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
20 timeout_context: None,
21 establishes_compilation: false,
22 serial_in_repository: false,
23 accepts_files: true,
24};
25
26pub static SHELL: LanguageSupport = LanguageSupport {
28 name: "shell",
29 display_name: "Shell",
30 extensions: &[".sh", ".bash"],
31 filenames: &[],
32 filename_prefixes: &[],
33 tools: &[&SHELLCHECK],
34 conventions: &[
35 "Unquoted expansions that glob or word-split",
36 "Commands whose failure is never checked",
37 "Pipelines whose failure set -e does not catch",
38 "cd without checking, and traps that never fire on the failure path",
39 ],
40 vendored_dirs: &[],
41};
42
43pub(crate) static FAMILY: &[&LanguageSupport] = &[&SHELL];