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