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

Method check_file_content

ci/lint_cpp_rs/src/lib.rs:3495–3518  ·  view source on GitHub ↗
(&self, file_content: &FileContent)

Source from the content-addressed store, hash-verified

3493 }
3494
3495 fn check_file_content(&self, file_content: &FileContent) -> Vec<(usize, String)> {
3496 let mut violations = Vec::new();
3497 let mut in_multiline_comment = false;
3498
3499 for (index, line) in file_content.lines.iter().enumerate() {
3500 let stripped = line.trim();
3501 if line.contains("/*") {
3502 in_multiline_comment = true;
3503 }
3504 if line.contains("*/") {
3505 in_multiline_comment = false;
3506 continue;
3507 }
3508 if in_multiline_comment || stripped.starts_with("//") {
3509 continue;
3510 }
3511 let code_part = split_line_comment(line);
3512 if code_part.contains("Serial.printf") {
3513 violations.push((index + 1, stripped.to_string()));
3514 }
3515 }
3516
3517 violations
3518 }
3519}
3520
3521struct UsingNamespaceFlInExamplesChecker;

Calls 15

split_line_commentFunction · 0.85
regex_using_namespace_flFunction · 0.85
strip_string_literalsFunction · 0.85
regex_has_includeFunction · 0.85
regex_static_assertFunction · 0.85
regex_string_literalFunction · 0.85
regex_deleted_funcFunction · 0.85
regex_deleted_func_eolFunction · 0.85
regex_new_allocFunction · 0.85
regex_deleteFunction · 0.85
regex_malloc_familyFunction · 0.85
has_forbidden_prefixFunction · 0.85

Tested by 1