Description
Is your feature request related to a problem? Please describe.
While scanning a repo with 4000+ TypeScript files with a total of 100+ rules, it always crashes with the error: "Fatal JavaScript out of memory: Reached heap limit". I'm using a standard GitHub-hosted runner for private repos with 2 cores and 7 GiB memory to perform the test.
Describe the solution you'd like
It would be awesome if there were an option to specify the maximum heap size for the underlying JavaScript runtime. Could be something equivalent to NODE_OPTIONS=--max_old_space_size=2048
.
Describe alternatives you've considered
I've tried specifying heap size by adding the command prefix NODE_OPTIONS=--max_old_space_size=2048
to the datadog-static-analyzer
binary but the JS runtime doesn't seem to use it.