(&mut self)
| 61 | } |
| 62 | |
| 63 | pub fn load_global(&mut self) -> Result<()> { |
| 64 | let global_config_path = get_global_config_path(); |
| 65 | |
| 66 | for ext in &["jsonc", "json"] { |
| 67 | let path = global_config_path.with_extension(ext); |
| 68 | if path.exists() { |
| 69 | self.load_from_file(&path)?; |
| 70 | break; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | if let Some(global_config_dir) = global_config_path.parent() { |
| 75 | if let Some(migrated_path) = |
| 76 | migrate_legacy_toml_config(global_config_dir, &mut self.config) |
| 77 | { |
| 78 | if !self.config_paths.contains(&migrated_path) { |
| 79 | self.config_paths.push(migrated_path); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | Ok(()) |
| 85 | } |
| 86 | |
| 87 | pub fn load_project<P: AsRef<Path>>(&mut self, project_dir: P) -> Result<()> { |
| 88 | let input = project_dir.as_ref(); |
no test coverage detected