I imported a new Github repo in Sonarcloud.
The import works but it detect only 44 lines of code, this lines are from the Dockerfile. Other line of code in other file are not detected.
However when browsing in the Code tab, I can see all the code from this Github repo.
Any hints to debug ?
Welcome to the community!
If you see the files in the UI, then they were detected. What is it that you feel is missing for these files?
Could you provide a screenshot of where you see the other files in SonarCloud?
Are you using automatic analysis, or have you configured analysis to run through your own CI?
Feel free to redact any sensitive information.
You’re going to have to give us a little more than that. File type icons and extensions at a minimum.
Can you share your analysis log, redacted as necessary?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
This guide will help you find them.
I didn’t realize we were dealing with automatic analysis. That means much (most? all?) of this is out of your control. I’m going to flag this for the team.
Well, you have more control over a CI analysis.
There are also some features that aren’t available to you with automatic analysis.
Do you have any custom configuration for your Automatic Analysis inside a .sonarcloud.properties file? If yes can you share it here please?
Also could you go in the “background tasks” of your project and share the
SonarScanner Context of one of your analysis? Redacting any confidential information.
Thanks for the background task context, it allowed me to search for the scanner logs in our Automatic Analysis tool.
Here is what I could find that would explain why your TS files are not analyzed:
It seems like your tsconfig file is the root cause of the problem.
- Either there is a problem in the tsconfig file itself ?
- Or the node_modules are not available at the time of the analysis, and some files inside the node_modules aRE referenced in your tsconfig file ?
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.