(caller: Node, target: Node, written: string)
| 583 | * way. Only there: `self.` is a convention elsewhere, not a rule. |
| 584 | */ |
| 585 | const ownMethodWithoutReceiver = (caller: Node, target: Node, written: string): boolean => { |
| 586 | if (!JS_FAMILY.has(caller.language) || target.kind !== 'method') return false; |
| 587 | if (/^(?:this|self)[.?]/.test(written)) return false; |
| 588 | const container = (q: string) => q.replace(/[.:]+[^.:]*$/, ''); |
| 589 | return caller.filePath === target.filePath && container(caller.qualifiedName) === container(target.qualifiedName); |
| 590 | }; |
| 591 | |
| 592 | /** A method the walk cannot enter (an interface's, an ORM's) on a repository-shaped container. */ |
| 593 | const repositoryMethod = (target: Node): boolean => { |
no test coverage detected