Background
server: Developer Edition - Version 9.9.3 (build 79811), hosted in aws EC2 docker container
scanner: github actions: sonarsource/sonarqube-scan-action@master (SHA:1b9d398800bf807ad36901b351fff52deba642d6)
*
I’ve noticed that the code section of my project in the sonarqube frontend does not show any indexed code files. Instead it says “No code files were found for analysis.” However, the logs say that 1806 files were indexed. This prevents me from viewing any code smells, security vulnerabilities, or other metrics.
Scanner parameters are set in sonar-project.properties as follows:
I think I’ve found a bug in the sonarqube-scan-action. Setting the fetch-depth to 0 for the job that runs the scanner causes the report to exclude all of the indexed files. Not setting fetch-depth produces the desired results.
Coming back to your logs, I realized you’re actually performing a pull request analysis!
2023-12-27T09:43:58.8212579Z 09:43:58.820 INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://test.vendor.se/dashboard?id=project&pullRequest=1
The whole point of a Pull Request analysis is that you only see changed lines, and when you perform a shallow clone you can’t accurately determine what lines changed, thus you get more results. But the results are not relevant in the context of a pull request.
I suggest you turn off shallow clones again (fetch depth: 0) and try analyzing your main branch.