Bug with encoded url path (plugin does not work)

Hello,

It seems vscode sonar plugin struggles with path like
src/c++/
The problem seems to be the url encoding use inside the plugin.

configuration: [
  baseDir: /home/godardo/git/sonar_bug
  extraProperties: {sonar.cfamily.compile-commands=/home/godardo/git/sonar_bug/compile_commands.json, sonar.js.internal.bundlePath=/home/godardo/.vscode-server/extensions/sonarsource.sonarlint-vscode-5.2.1-linux-x64/eslint-bridge}

  activeRules: [19 kubernetes, 312 python, 439 cpp, 192 c, 22 go, 294 ipython, 30 secrets, 18 docker, 517 java, 50 Web, 15 xml, 305 csharpsquid, 170 php, 29 terraform, 21 azureresourcemanager, 17 cloudformation]
  inputFiles: [
    file:///home/godardo/git/sonar_bug/src/c%2B%2B/main.cpp (UTF-8) [cpp]
  ]
]

Minimal example here :

The analyze does not work on the only file main.cpp. The workaround is to create a link
c%2B%2B → c++. Then the analyze is made(Sonar must complain for the unused variable).
So in my example I have the two following paths to help the plugin :
sonar_bug/src/c++
sonar_bug/src/c%2B%2B

If there is better solution or if a fix could be done it would be great.

Thanks!

Hi,

Welcome to the community and thanks for this report!

Can you give your context for this? Explicitly, what version of SonarQube for VS Code are you in?

 
Thx,
Ann

I m using the latest version : 5.2.1 but I have the issue with sonar 5.0 also. I m using vscode 1.119.0.

Hi,

Thanks for confirming you’re on a current version.

Could you provide a verbose log from IDE startup through to the error?

 
Thx,
Ann

log ko:

sonar_ko.log (57.0 KB)

logs ok (with the shortcut c%2B%2B created):

sonar_ok.log (57.1 KB)

Hi,

Thanks for the logs!

I’ve flagged this for the team.

 
Ann

Hey @leCapi, many thanks for the detailed report, that’s very helpful.

We are currently investigating the issue and will come back to you as soon as we have found something concrete.