(root: &Path, files: &mut BTreeSet<PathBuf>)
| 1718 | } |
| 1719 | |
| 1720 | fn collect_directory_files(root: &Path, files: &mut BTreeSet<PathBuf>) { |
| 1721 | for entry in WalkDir::new(root) |
| 1722 | .into_iter() |
| 1723 | .filter_entry(|entry| should_visit_directory(entry.path())) |
| 1724 | .filter_map(Result::ok) |
| 1725 | { |
| 1726 | if !entry.file_type().is_file() { |
| 1727 | continue; |
| 1728 | } |
| 1729 | let path = entry.path(); |
| 1730 | if parent_has_cpp_no_lint_marker(path) { |
| 1731 | continue; |
| 1732 | } |
| 1733 | if is_cpp_like_path(&normalize_path(&path_to_string(path))) { |
| 1734 | files.insert(path.to_path_buf()); |
| 1735 | } |
| 1736 | } |
| 1737 | } |
| 1738 | |
| 1739 | fn should_visit_directory(path: &Path) -> bool { |
| 1740 | if !path.is_dir() { |
no test coverage detected