简体   繁体   中英

Project’s Sonarqube scan issue in Azure DevOps

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] 

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM