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

Function iwyu_classify_header

ci/lint_cpp_rs/src/lib.rs:3149–3166  ·  view source on GitHub ↗
(header_path: &str, include_line: &str)

Source from the content-addressed store, hash-verified

3147}
3148
3149fn iwyu_classify_header(header_path: &str, include_line: &str) -> &'static str {
3150 if include_line.contains('<') && include_line.contains('>') {
3151 return "system";
3152 }
3153 if IWYU_INTERNAL_HEADER_PREFIXES
3154 .iter()
3155 .any(|prefix| header_path.starts_with(prefix))
3156 {
3157 return "internal";
3158 }
3159 if !header_path.contains('/') && ends_with_any(header_path, &[".h", ".hpp"]) {
3160 return "internal";
3161 }
3162 if header_path.starts_with("platforms/") {
3163 return "platform";
3164 }
3165 "system"
3166}
3167
3168fn iwyu_format_violation(_header_path: &str, header_type: &str, include_line: &str) -> String {
3169 let type_desc = if header_type == "platform" {

Callers 1

check_file_contentMethod · 0.85

Calls 4

ends_with_anyFunction · 0.85
anyMethod · 0.65
containsMethod · 0.45
starts_withMethod · 0.45

Tested by

no test coverage detected