So… here’s a project as small as I can make it. It will not build, but it will illustrate my issue:
If you open app-header.component.ts and remove readonly from one of the injected services in the constructer, nothing happens in SonarCloud. But if you comment out the line this.currentUser = currentUser; (approx line 62) it is picked up by SonarCloud.
One thing I thought about is the fact that Angular as a framework is NOT present in package.json as it is bundled in @eui/deps-base. I don’t know if that could matter… RINA.zip (1.7 MB)
And I feel that I must state, that I did not write the code… I just maintain it and try to improve it.
I’m part of the team working on the JS/TS analyzer. Rule S2933 depends on the TypeScript type checker used in its implementation. For performance reasons, we disable this in the SonarQube for IDE context when projects files are above a certain threshold. You should see the following logs in that case.
The result is that some rules lose in precision.
You can edit this parameter with sonar.javascript.sonarlint.typechecking.maxfiles, which is set by default to 20k.
This behaviour is not present in the scanner context, that is why you would always see the issues on SonarQube Cloud.
However, the difference in behaviour between IntelliJ and WebStorm is indeed confusing. Is it possible that you fetch files in a different fashion, @nicolas.quinquenel ?
Regardless which IDE I use, I open the same folder on my local machine. I use Fork as my git client, but other thatn that I really don’t know what to say…
To give an update, we haven’t forgotten you but we also haven’t made much progress on your case. We haven’t had other reports for this issue and we cannot make a reproducer.
Could you please try the latest release of SonarQube for IDE, version 10.19, and see if the issue is still there?
It would also be great if you could share the full SonarQube for IDE logs, from the very start when you start your IDE, up to the analysis on WebStorm that does not raise the issue. It would help us to have more context on what’s happening.