codelens_engine/call_graph/
noise.rs1pub fn is_noise_callee(name: &str) -> bool {
6 matches!(
7 name,
8 "get" | "set" | "push" | "pop" | "len" | "from" | "into"
10 | "map" | "filter" | "collect" | "contains" | "insert" | "remove"
11 | "format" | "print" | "clone" | "default" | "next" | "read"
12 | "write" | "open" | "close" | "keys" | "values" | "sort"
13 | "reverse" | "find" | "replace" | "delete" | "add" | "clear"
14 | "of" | "size" | "copy"
15 | "is_empty" | "to_string" | "to_owned" | "as_str" | "as_ref"
17 | "unwrap" | "expect" | "ok" | "err" | "and_then" | "or_else"
18 | "unwrap_or" | "unwrap_or_else" | "unwrap_or_default"
19 | "iter" | "into_iter" | "take" | "skip"
20 | "println" | "eprintln" | "drop" | "enter" | "lock" | "cloned"
21 | "range" | "enumerate" | "zip" | "sorted" | "reversed"
23 | "isinstance" | "issubclass" | "hasattr" | "getattr" | "setattr" | "delattr"
24 | "type" | "super" | "str" | "int" | "float" | "bool"
25 | "list" | "dict" | "tuple" | "frozenset" | "bytes" | "bytearray"
26 | "repr" | "abs" | "min" | "max" | "sum" | "any" | "all"
27 | "ord" | "chr" | "hex" | "oct" | "bin" | "hash" | "id"
28 | "input" | "vars" | "dir" | "help" | "round"
29 | "append" | "extend" | "update" | "items" | "join" | "split"
30 | "strip" | "startswith" | "endswith" | "encode" | "decode"
31 | "upper" | "lower"
32 | "log" | "warn" | "error" | "info" | "debug"
34 | "toString" | "valueOf" | "JSON" | "parse" | "stringify" | "assign"
35 | "entries" | "forEach" | "reduce" | "findIndex" | "some" | "every"
36 | "includes" | "indexOf" | "slice" | "splice" | "concat"
37 | "flat" | "flatMap" | "fill" | "isArray"
38 | "Promise" | "resolve" | "reject" | "then" | "catch" | "finally"
39 | "setTimeout" | "setInterval" | "clearTimeout" | "clearInterval"
40 | "parseInt" | "parseFloat" | "isNaN" | "isFinite" | "require"
41 | "make" | "cap" | "panic" | "recover" | "real" | "imag" | "complex"
43 | "Println" | "Printf" | "Sprintf" | "Fprintf" | "Errorf" | "New"
44 | "equals" | "hashCode" | "compareTo" | "getClass"
46 | "notify" | "notifyAll" | "wait" | "isEmpty"
47 | "addAll" | "containsKey" | "containsValue" | "put" | "putAll"
48 | "entrySet" | "keySet" | "charAt" | "substring" | "trim"
49 | "length" | "toArray" | "stream" | "asList"
50 )
51}
52
53pub(crate) fn is_noise_callee_for_lang(name: &str, lang: Option<&str>) -> bool {
55 if lang == Some("rs") && name == "new" {
56 return false;
57 }
58 is_noise_callee(name)
59}