Skip to content

Commit

Permalink
Merge pull request #57 from fuhrmanator/fuhrmanator/issue56
Browse files Browse the repository at this point in the history
Don't crash on (ignore) JavaScript files
  • Loading branch information
fuhrmanator authored May 26, 2024
2 parents 71f3894 + c449570 commit d114b86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class Importer {

// try {
logger.debug(`famixRepFromPaths: paths: ${paths}`);

this.project.addSourceFilesAtPaths(paths);

initFamixRep(this.project);
Expand All @@ -51,7 +52,8 @@ export class Importer {
}

private processEntities(project) {
processFunctions.processFiles(project.getSourceFiles());
const onlyTypeScriptFiles = project.getSourceFiles().filter(f => f.getFilePath().endsWith('.ts'));
processFunctions.processFiles(onlyTypeScriptFiles);
const accesses = processFunctions.accessMap;
const methodsAndFunctionsWithId = processFunctions.methodsAndFunctionsWithId;
const classes = processFunctions.classes;
Expand Down

0 comments on commit d114b86

Please sign in to comment.