drep/languages/definitions/
ruby.rs1use crate::languages::spec::{
4 DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
5};
6
7pub static RUBOCOP: ToolSpec = ToolSpec {
14 name: "rubocop",
15 command: &["rubocop", "--format", "json", "--force-exclusion"],
16 local_paths: &["bin/rubocop"],
17 config_files: &[".rubocop.yml"],
18 config_flag: None,
19 output_format: OutputFormat::Rubocop,
20 diagnostics_stream: DiagnosticsStream::Stdout,
21 timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
22 timeout_context: None,
23 establishes_compilation: false,
24 serial_in_repository: false,
25 accepts_files: true,
26};
27
28pub static RUBY: LanguageSupport = LanguageSupport {
34 name: "ruby",
35 display_name: "Ruby",
36 extensions: &[".rb", ".rake", ".gemspec"],
37 filenames: &["Gemfile", "Rakefile"],
38 filename_prefixes: &[],
39 tools: &[&RUBOCOP],
40 conventions: &[
41 "Monkey patches and reopenings of core classes",
42 "nil flowing where the code assumes a value",
43 "Mutable defaults shared across calls",
44 "Exceptions swallowed by a rescue that only logs",
45 "Blocks whose break/next semantics skip cleanup",
46 ],
47 vendored_dirs: &[".bundle"],
48};
49
50pub(crate) static FAMILY: &[&LanguageSupport] = &[&RUBY];