use crate::languages::spec::{
DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
};
pub static LUACHECK: ToolSpec = ToolSpec {
name: "luacheck",
command: &["luacheck", "--formatter", "plain", "--codes", "--no-color"],
local_paths: &["lua_modules/bin/luacheck"],
config_files: &[".luacheckrc"],
config_flag: None,
output_format: OutputFormat::Position,
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 LUA: LanguageSupport = LanguageSupport {
name: "lua",
display_name: "Lua",
extensions: &[".lua"],
filenames: &[],
filename_prefixes: &[],
tools: &[&LUACHECK],
conventions: &[
"Accidental globals from a missing local",
"nil arithmetic and indexing",
"1-based indexing and # on tables with holes",
"Errors swallowed by pcall without inspecting the result",
],
vendored_dirs: &["lua_modules", ".luarocks"],
};
pub(crate) static FAMILY: &[&LanguageSupport] = &[&LUA];