The main branch has no lines of code. always

Hello, I’m into docker sonarqube:lts-community.

I have this message “The main branch has no lines of code.”. I read a lot of posts and I find that there is no explanation for this message. I started an installation again and I have the same thing. How can I determine the error in this message?
I don’t see too many error messages in the code. On the scanner, we see a message “0 source files to be analyzed” and The plugin go is loading.

I tell myself that the code was not retrieved for analysis but there is no error message. In the interfaces SONAR, I see that go is present but in the scanner, there is no mention of it.
./sonar-scanner -Dsonar.projectKey=XXXXXX -Dsonar.sources=. -Dsonar.login=XXXX -Dsonar.language=go
During my previous installation, I think I saw it. But strangely he doesn’t throw me away, the variable is probably wrong (taken from a forum).

How can I move forward? so that other users can move forward. This seems like a very recurring problem.
(In the videos it works like a finger snap, it is strange :stuck_out_tongue: )

Well this morning, for now I included the scan in my Jenkins so that it scans the code from jenkins.

I find that it’s a bit of a source of error but hey I thought we had done everything automatically. damage.


Welcome to the community!

Did you work through this? If not, can you post your full analysis log?

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.