MCPcopy Create free account
hub / github.com/FastLED/FastLED / collect_directory_files

Function collect_directory_files

ci/lint_cpp_rs/src/lib.rs:1720–1737  ·  view source on GitHub ↗
(root: &Path, files: &mut BTreeSet<PathBuf>)

Source from the content-addressed store, hash-verified

1718}
1719
1720fn 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
1739fn should_visit_directory(path: &Path) -> bool {
1740 if !path.is_dir() {

Callers 2

collect_input_filesFunction · 0.85
collect_pathFunction · 0.85

Calls 7

should_visit_directoryFunction · 0.85
is_cpp_like_pathFunction · 0.85
path_to_stringFunction · 0.85
normalize_pathFunction · 0.70
pathMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected