Run Code analysis failing for Angular project while doing analysis via Azure DevOps Pipeline

Hi Team,

We are using Sonarqube 10.6 Community Edition and trying to do a Sonarqube analysis with angular project via Azure DevOps build pipeline.

Analysis failing with below error.
2024-09-16T05:43:56.7743057Z ##[error]ERROR: Cannot analyze file ClientApp/src/app/SIManageEstimate/SIManageEstimate.component.html
java.lang.NumberFormatException: For input string: “{{roweditable== false ? ‘-1’ : ‘’ }}”
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:651)
at org.sonar.plugins.html.api.accessibility.AccessibilityUtils.isFocusableElement(AccessibilityUtils.java:53)

Solution we tried from our end is to set NODE_OPTIONS --max-old-space-size=8192. but still getting this issue.

We have also tried to skip these html files in sonar analysis where it is throwing the error but still the issue is re-occurring.

Kindly check the attached file for more details on the failure analysis logs and help us.

Note: In DevOps pipeline, we are using Windows server VM as a build agent to run the analysis on the pipeline where the angular code is downloaded.

Run Analysis Logs for Angular Project.txt (73.3 KB)

Thanks,
Muhammadh

Hey there.

Can you provide a copy of this file that fails to parse?

Hi Im attaching here the full logs of Run analysis recieved from the pipeline

Run Analysis Logs for Angular Project.txt (73.3 KB)

Hi Team,

Can we please have any updates?

Thanks,
Muhammadh

Heya.

You provided more logs, but didn’t answer my question directly:

If it’s urgent, please know you can always choose to exclude the file that is giving an error.