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

Function top_level_headers

ci/lint_cpp_rs/src/lib.rs:2932–2952  ·  view source on GitHub ↗
(root_prefix: &str, dir: &str)

Source from the content-addressed store, hash-verified

2930}
2931
2932fn top_level_headers(root_prefix: &str, dir: &str) -> HashSet<String> {
2933 let mut headers = HashSet::new();
2934 let root = join_project_path(root_prefix, dir);
2935 let Ok(entries) = fs::read_dir(root) else {
2936 return headers;
2937 };
2938 for entry in entries.flatten() {
2939 let path = entry.path();
2940 if !path.is_file() {
2941 continue;
2942 }
2943 let name = path
2944 .file_name()
2945 .and_then(|value| value.to_str())
2946 .unwrap_or("");
2947 if name.ends_with(".h") || name.ends_with(".hpp") {
2948 headers.insert(name.to_string());
2949 }
2950 }
2951 headers
2952}
2953
2954fn all_test_header_filenames(root_prefix: &str) -> HashSet<String> {
2955 let root = join_project_path(root_prefix, "tests");

Callers 1

check_file_contentMethod · 0.85

Calls 5

join_project_pathFunction · 0.85
pathMethod · 0.45
ends_withMethod · 0.45
insertMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected