MCPcopy Create free account
hub / github.com/angular/components / checkSourceFile

Function checkSourceFile

tools/tslint-rules/symbolNamingRule.ts:19–33  ·  view source on GitHub ↗
(context: Lint.WalkContext<RegExp>)

Source from the content-addressed store, hash-verified

17}
18
19function checkSourceFile(context: Lint.WalkContext<RegExp>) {
20 context.sourceFile.forEachChild(function walk(node) {
21 if (
22 (ts.isClassDeclaration(node) ||
23 ts.isInterfaceDeclaration(node) ||
24 ts.isTypeAliasDeclaration(node)) &&
25 node.name &&
26 !context.options.test(node.name.text)
27 ) {
28 context.addFailureAtNode(node.name, `Symbol name must match pattern ${context.options}`);
29 }
30
31 node.forEachChild(walk);
32 });
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected