Sonar analysis takes too long to analyse some javascript functions

  • I’m running SonarCloud, javascript analysis and SonarScanner 4.3.0.2102
  • I’m having troubles to analyse some files when I invoke a function like new Date(date), moment(date) or Math.floor(number). In files that I have this, analysis take an hour to be completed (I have 22k lines at this project), if I remove the lines where I have this, the analysis takes seconds to be completed. This occurs when I invoke the function under a object construction
  • I’d like to be able to run the analysis including this files, for now I exclude the 4 files from analysis but I really would like to analyse the complet project

code example

"bool":{
   "must":[
      {
         "range":{
            "original_date":{
               "gt":"moment(date).utc().toISOString()"
            }
         }
      },
      {
         "exists":{
            "field":"id"
         }
      }
   ]
}