Skip to content

Sonar 10.8 not supported #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jborgers opened this issue Jan 15, 2025 · 4 comments
Open

Sonar 10.8 not supported #108

jborgers opened this issue Jan 15, 2025 · 4 comments

Comments

@jborgers
Copy link
Contributor

As reported here sonar yaml plugin last supported version is 10.7

YAML Analyzer when used with SonarQube 10.8 sonar.ansible.activate=true (default) creates error messages:

##[error]10:35:23.000 ERROR Cannot analyse 'roles/common/tasks/httpd.yml': Trying to save highlighting twice for the same file is not supported: roles/common/tasks/httpd.yml

@slapula
Copy link

slapula commented Jan 16, 2025

Yup, I'm seeing this too in our migration to 10.8

@gvrf2911
Copy link

Hello,

I cannot reproduce the problem with SonarQube Server DCE 2025.1 and Yaml plugin version 1.9.1.

The scanner analysis completes correctly, and I only get warnings in the logs:

WARN: Cannot save measures for file main.yml, ignoring them
WARN: Cannot save highlighting for file main.yml, ignoring

Strangely (but okay), I have both Ansible and Yaml issues in files where both plugins detect them.

The behavior we have in our SonarQube instance confirms what I was thinking; this problem already happened when Sonar added Kubernetes analysis in SonarQube and, to what I have understood, had been fixed with this PR (merged in version 1.8.1 of the Yaml plugin).

So I am confused that you run into this problem in SonarQube 10.7 or 10.8.

@wiebkeschwierz
Copy link

We run into the same problem with Sonar 2025.1 and YAML Plugin version 1.9.1.

@wiebkeschwierz
Copy link

wiebkeschwierz commented Mar 28, 2025

Short update. I did some more tests. Our exact error message is
10:26:48.009 ERROR Error during SonarScanner Engine execution
java.lang.UnsupportedOperationException: Can not add the same measure twice on .yml
DefaultMeasure[component=.yml,fromCore=false,metric=Metric[bestValue=,decimalScale=,deleteHistoricalData=false,description=Number of comment lines,direction=1,domain=Size,enabled=true,hidden=false,key=comment_lines,name=Comment Lines,optimizedBestValue=false,qualitative=false,type=INT,userManaged=false,uuid=,worstValue=],value=1,saved=false,storage=org.sonar.scanner.sensor.DefaultSensorStorage@79970c4a]

And it seems to only happen for yml files which only contain one line which is a comment.
For other files it correctly shows messages like these:
WARN: Cannot save measures for file .yml, ignoring them
WARN: Cannot save highlighting for file ,yml ignoring

Maybe you can now reproduce @gvrf2911

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants