Project’s Sonarqube scan issue in Azure DevOps

Viewed 201

I have a CI pipeline in Azure DevOps for .net core app. Below is the task list in the job.

1] Prepare Analysis Configuration (5.0.0) 2] .NET Core (2.187.0) to restore, build, publish and test 3] Run Code Analysis (5.0.0)

Build failing at the “Run Code Analysis” step. Error details below.

##[error]java.lang.IllegalArgumentException: Start pointer [line=40, lineOffset=49] should be before end pointer [line=40, lineOffset=49] 
1 Answers

There are few possibilities to fix the illegal attribute exception

Change your encoding method into

  1. UTF-8

  2. UTF-8 with BOM

  3. and others like (UTF-16 LE, UTF-16 LE with BOM, UTF-16 BE, UTF-16 BE with BOM, Western (Windows 1252)) as per your usage

Try to re-create the file again by either cloning the repo to different location or by copy-paste the file contents inside newly created file.

Try to use the Recent Sonarqube version 9.1

Refer here Link 1 & Link 2

Related