If your question is about SonarQube for IDE in the IntelliJ Platform, VS Code, Visual Studio, or Eclipse, please post it in that sub-category.
Otherwise, please provide:
Operating system: Windows 11
IDE name and flavor/env: PyCharm Pro
And a thorough description of the problem / question:
The issue I’m having is that files in the tests directory are not being analyzed by the sonar IDE plugin. The files are detected when I submit my PR to GitHub though, as can be seen by the screenshot here.
I have tried manually running sonar for the individual files as well as for the entire project, but it does not find any detections in these files inside my IDE. My directory is marked as “test sources root” by PyCharm, though unmarking that did not change the behavior at all.
“Normal” rules aren’t generally run on test files, so it sounds like SonarQube for IDE is correctly recognizing your test files as test files. It sounds like the error here is that normal analysis is not.
If you’d like to pursue this nonetheless, can you share a verbose log from IDE startup, through to where you (don’t ) see this?
I feel obligated to point out that if test files are analyzed as normal lines of code, then they’re charged as normal lines of code against your license.
And if that’s what you want to do, then there should be a way to configure this in SonarQube for IntelliJ. But can we have those logs?