pub(crate) const SOURCE_CODE_EXTENSIONS: &[&str] = &[
"c", "cc", "cpp", "cxx", "h", "hpp", "cs", "go", "java", "js", "jsx", "mjs", "cjs", "ts",
"tsx", "mts", "cts", "py", "rb", "rs", "swift", "kt", "kts", "php", "vue", "svelte",
];
pub(crate) const REVIEW_EXTRA_EXTENSIONS: &[&str] = &[
"json", "toml", "yaml", "yml", "md", "sql", "sh", "ps1", "xml", "txtar",
];
pub(crate) fn is_source_code_extension(ext: &str) -> bool {
SOURCE_CODE_EXTENSIONS.contains(&ext)
}
pub(crate) fn is_review_file_extension(ext: &str) -> bool {
is_source_code_extension(ext) || REVIEW_EXTRA_EXTENSIONS.contains(&ext)
}