Hello, we’re trying to configure SonarLint in both IntelliJ and VSCode, but none of them locates the intended project in our connected server. We can see other projects, but not ours.
The ID is correct, my user has all permission boxes enabled and the project is being normally scanned through our GitLab pipeline. The issue is exclusively in the IDEs’ access we’re trying to use.
Operating system: Windows 11 Enterprise 64b
IDE name and flavor/env: Both IntelliJ IDEA 2023.3.3 (Ultimate Edition) and Visual Studio Code 1.87.2
Hi @KarlaDell, are you connected to a SonarQube server or SonarCloud? If you are connected to SonarQube, which version is it?
My first guess would be a permission issue. If you use a token, it should have permission to view the project; if you use a username/password, the user account should have permission to view the project.
Hello, thanks for trying to help. We’re using SonarQube Data Center EditionVersion 9.9.2 (build 77730). My user has full permissions checked in the project, and I’m indeed using a user token. So I’m afraid that option is not valid for the scenario.
Also, with curl I only get a small list of projects (the server has many more). It only gives me back 100 records while in the server there are more than 17 thousand.
project keys that are exactly the same as the supplied string
I want to ensure that you can retrieve the project information via curl. If not, I will move the ticket to the SonarQube team directly, as I don’t think it’s an issue coming from SonarLint.
In this case, I wonder if the issue is because of the many projects on your SonarQube server. Can you enable the SonarLint logs and check if you see the following message (after having searched for your project):
Limiting number of requested pages from '{}' to {}. Some of the data won't be fetched
[Debug - 08:41:35.650] Limiting number of requested pages from ‘api/components/search.protobuf?qualifiers=TRK’ to 20. Some of the data won’t be fetched
Thanks, I think the issue is clear. We currently limit the number of projects we can fetch to 10,000, so your project is likely not retrieved. I will assign the thread to the appropriate team so they can see what could be improved here.
In the meantime, the only workaround I can think of would be to limit the scope of projects you can access in SonarQube.
Thinking about a workaround, I totally forgot, but you can directly provide your SonarQube project key in the input field. The project key can be found in the URL of your SonarQube project, for example:
Yes, that’s what I tried (retrieving from the UI). But this didn’t work in VSCode.
I’ll try again in IntelliJ, but can you think of another workaround for VSCode?
It doesn’t give me any binding errors in IntelliJ (by writing the project key), but it also won’t really throw me the vulnerabilities issues that it gives me on the UI. It might be a different issue, but I’m assuming that maybe it’s not binding as it should.