Skip to content

Commit

Permalink
[JsSrc2Cpg] : Increase robustness of Js frontend (#5282)
Browse files Browse the repository at this point in the history
* fix - partial ast gen result in case of failure

---------

Co-authored-by: PallaviShreshtha <[email protected]>
  • Loading branch information
khemrajrathore and PallaviShreshtha authored Feb 5, 2025
1 parent 7417125 commit cd84cd9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ class AstGenRunner(config: Config) {
AstGenRunnerResult(parsed.map((in.toString(), _)), skipped.map((in.toString(), _)))
case Failure(f) =>
logger.error("\t- running astgen failed!", f)
AstGenRunnerResult()
val parsed = checkParsedFiles(filterFiles(SourceFiles.determine(out.toString(), Set(".json")), out), in)
val skipped = List.empty
AstGenRunnerResult(parsed.map((in.toString(), _)), skipped.map((in.toString(), _)))
}
}

Expand Down

0 comments on commit cd84cd9

Please sign in to comment.