Getting error while analyzing Angular project

Hi Team,

I am using SonarQube Version 7.9.3, Developer edition and integrated Sonarqube in Azure CI/CD pipeline. In “Run Code Analysis” step in Azure CI pipeline, I am getting errors while analyzing Angular project. Please find the error in the attached file.

Please let me know how to resolve this issue.

Thanks & Regards,
Run_code_analysis_error.txt (39.8 KB)

Hi @aashi31 and welcome to the community :slight_smile:
I took a look in your logs and I saw this

Invalid character encountered in file D:/a/1/s/dist/cnc-dev/styles.038b20e87bf62653099f.css at line 23 for encoding windows-1252. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’.

It seems like you have encoding problems. I suggest you try to add the advised property “sonar.sourceEncoding” to your file and try again.
Please let me know if it solves your problem.

Kind regards,

Hi Christophe,

That was one of the warning message that you have mentioned, please check the error that is given the file I have shared. Attaching the screenshot from the file highlighting the error:


Have you tried this solution yet?