High memory usage when SonarLint attempts to analyze a JavaScript file

Please provide

  • Operating system: Windows 10 Pro 22H2
  • SonarLint plugin version: 10.12.0.79769
  • IntelliJ version: Ultimate edition 2024.2.4
  • Programming language you’re coding in: Javascript
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

When SonarLint tries to analyze a javascript file it throws this error after some time:

[2024-11-25T11:10:49.432] [nodejs-stream-consumer] DEBUG sonarlint - The worker thread failed: Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] ERROR sonarlint - The analysis will stop due to the Node.js process running out of memory (heap size limit 16432 MB)
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] ERROR sonarlint - You can see how Node.js heap usage evolves during analysis with "sonar.javascript.node.debugMemory=true"
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] ERROR sonarlint - Try setting "sonar.javascript.node.maxspace" to a higher value to increase Node.js heap size limit
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] ERROR sonarlint - If the problem persists, please report the issue at https://community.sonarsource.com
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] DEBUG sonarlint - The worker thread exited with code 1
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] DEBUG sonarlint - The bridge server shut down
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] INFO sonarlint - Rule | Time (ms) | Relative
 [2024-11-25T11:10:49.432] [nodejs-stream-consumer] INFO sonarlint - :----|----------:|--------:
 [2024-11-25T11:10:49.432] [sonarlint-analysis-engine] ERROR sonarlint - Failure during analysis
 [2024-11-25T11:10:49.432] [sonarlint-analysis-engine] INFO sonarlint - Hit the cache for 0 out of 1
 [2024-11-25T11:10:49.432] [sonarlint-analysis-engine] INFO sonarlint - Miss the cache for 1 out of 1: RUNTIME_API_INCOMPATIBLE [1/1]
 [2024-11-25T11:10:49.432] [sonarlint-analysis-engine] ERROR sonarlint - Error executing sensor: 'JavaScript/TypeScript analysis'
java.lang.IllegalStateException: Analysis of JS/TS files failed
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doRunAnalysis(AnalyzeCommand.java:65)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.lambda$execute$0(AnalyzeCommand.java:54)
	at org.sonarsource.sonarlint.core.progress.RpcProgressMonitor.lambda$startTask$0(RpcProgressMonitor.java:44)
	at org.sonarsource.sonarlint.core.progress.TaskManager.startTask(TaskManager.java:61)
	at org.sonarsource.sonarlint.core.progress.RpcProgressMonitor.startTask(RpcProgressMonitor.java:44)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:53)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:34)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalStateException: The bridge server is unresponsive
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:415)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeJavaScript(BridgeServerImpl.java:369)
	at org.sonar.plugins.javascript.analysis.AbstractAnalysis.analyzeFile(AbstractAnalysis.java:109)
	at org.sonar.plugins.javascript.analysis.AnalysisWithWatchProgram.analyzeTsConfig(AnalysisWithWatchProgram.java:121)
	at org.sonar.plugins.javascript.analysis.AnalysisWithWatchProgram.analyzeFiles(AnalysisWithWatchProgram.java:77)
	at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:128)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:77)
	... 17 more
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:964)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:406)
	... 23 more
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.common.Utils.wrapWithExtraDetail(Utils.java:388)
	at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.onReadError(Http1Response.java:590)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.checkForErrors(Http1AsyncReceiver.java:302)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.flush(Http1AsyncReceiver.java:268)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	... 1 more
Caused by: java.io.EOFException: EOF reached while reading
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver$Http1TubeSubscriber.onComplete(Http1AsyncReceiver.java:601)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadSubscription.signalCompletion(SocketTube.java:648)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:853)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalReadable(SocketTube.java:782)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadEvent.signalEvent(SocketTube.java:965)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowEvent.handle(SocketTube.java:253)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(HttpClientImpl.java:1467)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(HttpClientImpl.java:1412)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:1412)

This is the log right before the error:

Trigger: BINDING_UPDATE
[BINDING_UPDATE] 1 file(s) submitted
Configuring analysis with org.sonarlint.intellij.java.JavaAnalysisConfigurator
Analysing 'wizardPPViewModel.js' (ID b8a49a61-120e-4905-bef2-08656b540f9e)...
 [2024-11-25T11:07:17.245] [SonarLint Server RPC request executor] DEBUG sonarlint - Extracting standalone rules metadata
 [2024-11-25T11:07:19.807] [SonarLint Server RPC request executor] INFO sonarlint - Triggering analysis with configuration: [
  baseDir: C:\Src\janus-ebb
  extraProperties: {sonar.java.target=13, sonar.java.libraries=C:\Users\raffaele.francabandi\.jdks\corretto-21.0.5\lib\jrt-fs.jar,C:\Users\raffaele.francabandi\.m2\repo-faac-nexus-internal\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar,C:\Users\raffaele.francabandi\.m2\repo-faac-nexus-internal\commons-io\commons-io\2.5\commons-io-2.5.jar, sonar.java.enablePreview=false, sonar.java.source=13, sonar.java.binaries=C:\Src\janus-ebb\janus-ms\janus-ms-ui\target\classes, sonar.java.jdkHome=C:/Users/raffaele.francabandi/.jdks/corretto-21.0.5, sonar.java.test.libraries=C:\Src\janus-ebb\janus-ms\janus-ms-ui\target\classes,C:\Users\raffaele.francabandi\.jdks\corretto-21.0.5\lib\jrt-fs.jar,C:\Users\raffaele.francabandi\.m2\repo-faac-nexus-internal\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar,C:\Users\raffaele.francabandi\.m2\repo-faac-nexus-internal\commons-io\commons-io\2.5\commons-io-2.5.jar, sonar.javascript.node.maxspace=16384}
  activeRules: [24 css, 476 java, 46 Web, 14 xml, 90 secrets, 265 javascript]
  inputFiles: [
    file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js (UTF-8)
  ]
]

 [2024-11-25T11:07:19.808] [SonarLint Server RPC request executor] DEBUG sonarlint - Restoring previous known findings database from C:\Users\raffaele.francabandi\AppData\Local\JetBrains\IntelliJIdea2024.2\sonarlint\storage\known_findings_backup.tar.gz
 [2024-11-25T11:07:20.001] [SonarLint Server RPC request executor] DEBUG sonarlint - Starting known findings database from C:\Users\raffaele.francabandi\.sonarlint\known-findings-store11724389856067370207
 [2024-11-25T11:07:25.791] [sonarlint-analysis-engine] DEBUG sonarlint - Start analysis
 [2024-11-25T11:07:25.806] [sonarlint-analysis-engine] INFO sonarlint - Index files
 [2024-11-25T11:07:25.806] [sonarlint-analysis-engine] DEBUG sonarlint - Language of file "file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js" is detected to be "JS"
 [2024-11-25T11:07:25.837] [sonarlint-analysis-engine] DEBUG sonarlint - Average line length for [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js] is 42
 [2024-11-25T11:07:25.837] [Report about progress of file indexation] INFO sonarlint - 1 file indexed
 [2024-11-25T11:07:26.084] [sonarlint-analysis-engine] DEBUG sonarlint - Added 0 checks for language='ts', repository='typescript'
 [2024-11-25T11:07:26.086] [sonarlint-analysis-engine] DEBUG sonarlint - Added 265 checks for language='js', repository='javascript'
 [2024-11-25T11:07:26.092] [sonarlint-analysis-engine] DEBUG sonarlint - No registered JsAnalysisConsumer.
 [2024-11-25T11:07:26.102] [sonarlint-analysis-engine] DEBUG sonarlint - 'JavaSensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.102] [sonarlint-analysis-engine] DEBUG sonarlint - 'Python Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.102] [sonarlint-analysis-engine] DEBUG sonarlint - 'IPython Notebooks Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.102] [sonarlint-analysis-engine] DEBUG sonarlint - Execute Sensor: HTML
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'XML Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'Kotlin Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'Gradle Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'PHP sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'Analyzer for "php.ini" files' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'IaC Terraform Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'IaC CloudFormation Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'IaC Kubernetes Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - 'IaC AzureResourceManager Sensor' skipped because there are no related files in the current project
 [2024-11-25T11:07:26.103] [sonarlint-analysis-engine] DEBUG sonarlint - Execute Sensor: Java Config Sensor
 [2024-11-25T11:07:26.119] [Progress of the Java analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-11-25T11:07:26.121] [Progress of the Java analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-11-25T11:07:26.121] [sonarlint-analysis-engine] DEBUG sonarlint - Execute Sensor: JavaScript/TypeScript analysis
 [2024-11-25T11:07:26.122] [sonarlint-analysis-engine] WARN sonarlint - No workDir in SonarLint
 [2024-11-25T11:07:26.123] [sonarlint-analysis-engine] DEBUG sonarlint - Deploying the bridge server into C:\Users\raffaele.francabandi\AppData\Local\JetBrains\IntelliJIdea2024.2\tmp\sonarlint\.sonarlinttmp_10638634213958771928\bridge-bundle
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] INFO sonarlint - 'sonar.nodejs.executable' is set. Skipping embedded Node.js runtime deployment.
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] DEBUG sonarlint - Starting server
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] DEBUG sonarlint - Creating Node.js process to start the bridge server on port 39604 
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] INFO sonarlint - Running in SonarLint context, metrics will not be computed.
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] INFO sonarlint - Configured Node.js --max-old-space-size=16384.
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] INFO sonarlint - Using Node.js executable C:\Program Files\nodejs\node.exe from property sonar.nodejs.executable.
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] DEBUG sonarlint - Checking Node.js version
 [2024-11-25T11:08:03.706] [sonarlint-analysis-engine] DEBUG sonarlint - Launching command C:\Program Files\nodejs\node.exe -v
 [2024-11-25T11:08:03.8] [sonarlint-analysis-engine] DEBUG sonarlint - Using Node.js v20.18.0.
 [2024-11-25T11:08:03.8] [sonarlint-analysis-engine] DEBUG sonarlint - Launching command C:\Program Files\nodejs\node.exe --max-old-space-size=16384 C:\Users\raffaele.francabandi\AppData\Local\JetBrains\IntelliJIdea2024.2\tmp\sonarlint\.sonarlinttmp_10638634213958771928\bridge-bundle\package\bin\server 39604 127.0.0.1 C:\Src\janus-ebb true true false 
 [2024-11-25T11:08:06.898] [nodejs-stream-consumer] INFO sonarlint - Memory configuration: OS (32452 MB), Node.js (16432 MB).
 [2024-11-25T11:08:06.898] [nodejs-stream-consumer] DEBUG sonarlint - Starting the bridge server
 [2024-11-25T11:08:06.93] [nodejs-stream-consumer] DEBUG sonarlint - The bridge server is listening on port 39604
 [2024-11-25T11:08:06.946] [nodejs-stream-consumer] DEBUG sonarlint - The worker thread is running
 [2024-11-25T11:08:07.071] [sonarlint-analysis-engine] DEBUG sonarlint - Bridge server started on port 39604 in 3365 ms
 [2024-11-25T11:08:07.071] [sonarlint-analysis-engine] DEBUG sonarlint - Analysis of unchanged files will not be skipped (current analysis requires all files to be analyzed)
 [2024-11-25T11:08:09.585] [nodejs-stream-consumer] DEBUG sonarlint - Initializing linter "default" with S6850,S2251,S6853,S6851,S6852,S2137,S2259,S5527,S930,S6859,S2814,S1848,S1607,S2819,S6842,S6843,S4423,S3696,S2486,S6840,S2123,S6841,S6846,S2004,S3699,S5876,S6847,S3579,S6844,S4426,S6845,S6848,S6035,S5860,S6397,S2234,S3686,S5863,S2598,S6836,S6957,S5868,S1940,S5869,S6958,S6959,S1135,S1134,S5850,S6821,S3796,S5973,S4524,S6824,S125,S6825,S128,S6822,S3799,S2589,S5856,S6823,S6827,S1143,S1264,S1481,S2692,S3782,S5842,S3785,S4634,S5843,S2699,S6811,S6019,S1119,S6819,S4084,S6486,S2681,S1472,S3531,S2685,S2201,S3776,S2688,S1479,S4624,S3415,S5958,S6807,S1128,S1126,S1125,S1121,S5264,S6594,S6353,S6479,S2430,S2310,S6477,S2432,S6478,S3403,S1219,S4619,S6481,S4043,S5254,S4165,S5257,S5256,S2301,S3516,S1226,S5260,S6351,S6331,S4275,S3981,S4830,S4158,S3984,S3500,S3863,S3504,S3626,S1314,S6582,S6321,S6442,S6443,S4144,S6440,S4143,S6441,S6325,S6326,S6323,S3972,S6324,S3854,S4822,S6328,S3735,S3616,S1439,S1321,S4030,S2094,S6671,S6551,S6793,S878,S2990,S6435,S6557,S2870,S2871,S6676,S6439,S4138,S6679,S2755,S6317,S6438,S1788,S2757,S2999,S2639,S4140,S6660,S6661,S2187,S6666,S888,S4123,S6788,S2189,S6544,S4125,S1533,S6789,S6426,S1534,S1656,S3834,S1536,S1301,S6790,S6791,S6772,S1082,S6770,S6650,S6534,S6535,S6653,S6774,S2970,S6654,S6775,S1763,S6657,S1764,S2737,S1527,S1529,S1199,S1077,S6761,S7059,S905,S1090,S108,S6644,S6523,S107,S6645,S6766,S6763,S6643,S1871,S6522,S1751,S1994,S6767,S1874,S6647,S3812,S1515,S101,S1516,S7060,S6092,S2392,S6750,S6079,S6754,S3001,S5542,S6637,S5547,S6638,S1862,S6635,S6756,S6757,S3800,S3923,S6080,S6861,S6747,S6627,S6748,S3358,S5659,S6746,S1854,S6509,S6749,S2703,S1068,S1186
 [2024-11-25T11:08:09.617] [nodejs-stream-consumer] DEBUG sonarlint - Creating linter config
 [2024-11-25T11:08:09.617] [nodejs-stream-consumer] DEBUG sonarlint - Linter config: {"language":"js","fileType":"MAIN"} with S101,S1068,S107,S1077,S108,S1082,S1090,S1119,S1121,S1125,S1126,S1128,S1134,S1135,S1143,S1186,S1199,S1219,S1226,S125,S1264,S128,S1301,S1314,S1321,S1439,S1472,S1479,S1481,S1515,S1516,S1527,S1529,S1533,S1534,S1536,S1607,S1656,S1751,S1763,S1764,S1788,S1848,S1854,S1862,S1871,S1874,S1940,S1994,S2004,S2094,S2123,S2137,S2189,S2201,S2234,S2251,S2259,S2301,S2310,S2392,S2430,S2432,S2589,S2598,S2639,S2681,S2685,S2688,S2692,S2703,S2737,S2755,S2757,S2814,S2819,S2870,S2871,S2990,S2999,S3001,S3358,S3403,S3500,S3504,S3516,S3531,S3579,S3616,S3626,S3686,S3696,S3699,S3735,S3776,S3782,S3785,S3796,S3799,S3800,S3812,S3834,S3854,S3863,S3923,S3972,S3981,S3984,S4030,S4043,S4084,S4123,S4125,S4138,S4140,S4143,S4144,S4158,S4165,S4275,S4423,S4426,S4524,S4619,S4624,S4634,S4822,S4830,S5254,S5256,S5257,S5260,S5264,S5527,S5542,S5547,S5659,S5842,S5843,S5850,S5856,S5860,S5868,S5869,S5876,S6019,S6035,S6317,S6321,S6323,S6324,S6325,S6326,S6328,S6331,S6351,S6353,S6397,S6435,S6438,S6439,S6440,S6441,S6442,S6443,S6477,S6478,S6479,S6481,S6486,S6509,S6522,S6523,S6534,S6535,S6544,S6551,S6557,S6582,S6594,S6627,S6635,S6637,S6638,S6643,S6644,S6645,S6647,S6650,S6653,S6654,S6657,S6660,S6661,S6666,S6671,S6676,S6679,S6746,S6747,S6748,S6749,S6750,S6754,S6756,S6757,S6761,S6763,S6766,S6767,S6770,S6772,S6774,S6775,S6788,S6789,S6790,S6791,S6793,S6807,S6811,S6819,S6821,S6822,S6823,S6824,S6825,S6827,S6836,S6840,S6841,S6842,S6843,S6844,S6845,S6846,S6847,S6848,S6850,S6851,S6852,S6853,S6859,S6861,S6957,S6958,S6959,S7059,S7060,S878,S888,S905,S930
 [2024-11-25T11:08:09.617] [nodejs-stream-consumer] DEBUG sonarlint - Linter config: {"language":"js","fileType":"TEST"} with S2187,S2486,S2699,S2970,S3415,S5863,S5958,S5973,S6079,S6080,S6092,S6426
 [2024-11-25T11:08:21.252] [sonarlint-analysis-engine] INFO sonarlint - Turning on type-checking of JavaScript files
 [2024-11-25T11:08:24.951] [sonarlint-analysis-engine] INFO sonarlint - Found 0 tsconfig.json file(s): []
 [2024-11-25T11:08:24.967] [sonarlint-analysis-engine] DEBUG sonarlint - Using generated tsconfig.json file using wildcards [C:\Users\RAFFAE~1.FRA\AppData\Local\Temp\tmp-21732-bCmisRlZVS6e]
 [2024-11-25T11:08:24.967] [sonarlint-analysis-engine] DEBUG sonarlint - Will use AnalysisWithWatchProgram because we are in SonarLint context
 [2024-11-25T11:08:24.967] [sonarlint-analysis-engine] DEBUG sonarlint - Initializing org.sonar.plugins.javascript.analysis.AnalysisWithWatchProgram


**[Unable to copy log]**



[2024-11-25T11:08:31.241] [sonarlint-analysis-engine] DEBUG sonarlint - [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js] matched C:\Users\RAFFAE~1.FRA\AppData\Local\Temp\tmp-21732-bCmisRlZVS6e
 [2024-11-25T11:08:31.241] [sonarlint-analysis-engine] INFO sonarlint - Analyzing 1 files using tsconfig: C:\Users\RAFFAE~1.FRA\AppData\Local\Temp\tmp-21732-bCmisRlZVS6e
 [2024-11-25T11:08:31.241] [sonarlint-analysis-engine] DEBUG sonarlint - Plugin version: [10.16.0.27621]
 [2024-11-25T11:08:31.241] [sonarlint-analysis-engine] DEBUG sonarlint - Cache strategy set to 'NO_CACHE' for file '[uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]' as the runtime API is not compatible
 [2024-11-25T11:08:31.241] [sonarlint-analysis-engine] DEBUG sonarlint - Analyzing file: file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js
 [2024-11-25T11:08:31.241] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1 source file to be analyzed
 [2024-11-25T11:08:31.257] [nodejs-stream-consumer] DEBUG sonarlint - Analyzing file "C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js" with linterId "default"
 [2024-11-25T11:08:41.254] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:08:51.266] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:01.28] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:11.29] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:21.301] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:31.31] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:41.326] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:09:51.328] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:10:01.331] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:10:11.336] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:10:21.342] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:10:31.344] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]
 [2024-11-25T11:10:41.352] [Progress of JavaScript/TypeScript analysis] INFO sonarlint - 1/1 file analyzed, current file: [uri=file:///C:/Src/janus-ebb/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/productprofile/viewModel/wizardPPViewModel.js]

For some reason it tries (?) to analyze the same file several times. each time it increases memory consumption. ( I’ve already allocated 16GB)
It seems to be something related to the hierarchy of the path where the project’s JS files are located, because if I copy the folder …\src\main\webapp\js\widgets.. inside my desktop and I open it with intellij as a project it starts working again.
If I copy instead …\janus-ms-ui\src\main\webapp\js\widgets.. it throws those errors above.

Current path (this is an example) is:
C:/src/janus_project/janus-ms/janus-ms-ui/src/main/webapp/js/widgets/pp/view/ppwizard.js

All JavaScript are at least within:
C:/src/janus_project/janus-ms/janus-ms-ui/src/main/webapp/js

Inside the second log I wrote the line [Unable to copy log], this is because for some reason it lists ALL the javascript files inside my project, this causes the log inside intellij to be cut off because it is too long.

I have no problem with java files within the same project.

I’ve already tried to:

  • Reinstall the plugin
  • Reinstall Intellij
  • Delete all sonarLint related folders inside Jetbrain folder in appdata
  • Delete .sonarlint folder inside user folder
  • Disabling all rules but one (I enabled as an example the rule S1440)

Hello @Raffaele992,

Can you please share how many JS/TS files you have to analyze in your project? Also, do you have any tsconfig.json files? They can allow you to better split up the project files and can help with decreasing the memory footprint. To be more precise - you could create multiple tsconfig.json (like in this thread) in certain folders that would split up your repository into more separate “programs” that typescript could analyze and not take up all of your memory and freeze.

A different solution could be to set the property sonar.javascript.allowTsParserJsFiles. This will remove typescript type-checking from the rules, but the analysis will not leverage typescript types to find issues.

Cheers,
Michal