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

Function has_forbidden_prefix

ci/lint_cpp_rs/src/lib.rs:3752–3758  ·  view source on GitHub ↗
(code: &str, start: usize)

Source from the content-addressed store, hash-verified

3750}
3751
3752fn has_forbidden_prefix(code: &str, start: usize) -> bool {
3753 if start == 0 {
3754 return false;
3755 }
3756 let prefix = &code[..start];
3757 prefix.ends_with("::") || prefix.ends_with('.')
3758}
3759
3760fn suggestion_new() -> &'static str {
3761 "Use fl::make_unique<T>() or fl::make_shared<T>() instead of bare 'new', or add '// ok bare allocation' to suppress"

Callers 1

check_file_contentMethod · 0.85

Calls 1

ends_withMethod · 0.45

Tested by

no test coverage detected