use crate::languages::spec::{
DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
};
pub static RUBOCOP: ToolSpec = ToolSpec {
name: "rubocop",
command: &["rubocop", "--format", "json", "--force-exclusion"],
local_paths: &["bin/rubocop"],
config_files: &[".rubocop.yml"],
config_flag: None,
output_format: OutputFormat::Rubocop,
diagnostics_stream: DiagnosticsStream::Stdout,
timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
timeout_context: None,
establishes_compilation: false,
serial_in_repository: false,
accepts_files: true,
};
pub static RUBY: LanguageSupport = LanguageSupport {
name: "ruby",
display_name: "Ruby",
extensions: &[".rb", ".rake", ".gemspec"],
filenames: &["Gemfile", "Rakefile"],
filename_prefixes: &[],
tools: &[&RUBOCOP],
conventions: &[
"Monkey patches and reopenings of core classes",
"nil flowing where the code assumes a value",
"Mutable defaults shared across calls",
"Exceptions swallowed by a rescue that only logs",
"Blocks whose break/next semantics skip cleanup",
],
vendored_dirs: &[".bundle"],
};
pub(crate) static FAMILY: &[&LanguageSupport] = &[&RUBY];