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

Function tests_relative_path

ci/lint_cpp_rs/src/lib.rs:2896–2904  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

2894}
2895
2896fn tests_relative_path(path: &str) -> Option<String> {
2897 let normalized = normalize_path(path);
2898 if let Some(index) = normalized.find("/tests/") {
2899 return Some(normalized[index + "/tests/".len()..].to_string());
2900 }
2901 normalized
2902 .strip_prefix("tests/")
2903 .map(|value| value.to_string())
2904}
2905
2906fn path_without_extension(path: &str) -> String {
2907 for suffix in [".cpp.hpp", ".cpp", ".hpp", ".h"] {

Callers 2

should_process_fileMethod · 0.85
check_file_contentMethod · 0.85

Calls 4

normalize_pathFunction · 0.70
findMethod · 0.45
to_stringMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected