判断文件是否为支持的源代码文件
(&self, path: &Path)
| 64 | |
| 65 | /// 判断文件是否为支持的源代码文件 |
| 66 | fn is_supported_file(&self, path: &Path) -> bool { |
| 67 | if let Some(ext) = path.extension().and_then(|e| e.to_str()) { |
| 68 | matches!(ext.to_lowercase().as_str(), |
| 69 | "cpp" | "cc" | "cxx" | "c++" | "c" | "h" | "hpp" | "hxx" | "hh" | |
| 70 | "inl" | "inc" | "tpp" | "tpl" | |
| 71 | "py" | "py3" | "pyx" | |
| 72 | "java" | |
| 73 | "rs" | |
| 74 | "ts" | |
| 75 | "tsx" | |
| 76 | "go" |
| 77 | ) |
| 78 | } else { |
| 79 | false |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | /// 增量更新单个文件 |
| 84 | pub fn refresh_file( |
no outgoing calls
no test coverage detected