MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / fileLanguage

Function fileLanguage

__tests__/cpp-declaration-only-headers.test.ts:186–186  ·  view source on GitHub ↗
(rel: string)

Source from the content-addressed store, hash-verified

184 expect(result.errors.filter((e) => e.code === 'parse_error')).toEqual([]);
185
186 const fileLanguage = (rel: string) => cg!.getNodesInFile(rel).find((n) => n.kind === 'file')?.language;
187 expect(fileLanguage('PdbDiaSession.h')).toBe('cpp');
188 expect(fileLanguage('Program.h')).toBe('cpp');
189 expect(fileLanguage('oldpdb.h')).toBe('cpp');

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected