2

I'm running SonarLint in connected mode, and it succeeds to download the more general information on rules and issues,

e.g

/batch/issues?key=MyProject

works fine.

When I open a specific source file in eclipse, the file gets analyzed correctly using the rules from the server, but the request to download the server issues fails.

SonarLint Console:

Found 8 issue(s)
Done in 328 ms
Download server issues for /project_root/src/main/java/com/mycompany/mypackage/MyClass.java

But the request fails with a HTTP 404 code and the following message:

{"errors":[{"msg":"Component key 'MyProject:src/main/java/com/mycompany/mypackage/MyClass.java' not found"}]}

If I send the request from the browser and manually add the "project_root/" to the key, the request succeeds and I get the server issues.

I've found some documentation about this request in SonarQube, at

[mysonarhost]/web_api/batch/issues

but it doesn't reveal much about the correct value of the key. It seems that SonarLint and SonarQube disagree what the "file key" for a specific source file should be.

Is this something that can be fixed by some setting in SonarLint, or do I need to change my SonarQube project setup?

Versions:

Eclipse:
Version: Oxygen.3 Release (4.7.3)
Build id: 20180308-1800

SonarLint for Eclipse:
3.4.0.201803051332

SonarQube:
Version 6.7.2 (build 37468)

Hulk
  • 6,399
  • 1
  • 30
  • 52

0 Answers0