Pull Request analysis shows 0 lines of code

The Pullrequest analysis shows 0 lines of code in the Sonarcloud portal. When I checked the ‘Code’ section, it was empty. I am attaching images for reference. Any guidance will be immensely appreciated as this is an urgent mattter.


These are my sonar scanner properties. I run my sonar scanner without any pipelines and CI on the command line.

sonar-scanner \
  -Dsonar.organization=xxx \
  -Dsonar.projectKey=xxx \
  -Dsonar.sources=. \
  -Dsonar.host.url=https://sonarcloud.io \
  -Dsonar.exclusions=**/node_modules/**/*  \
  -Dsonar.token=xxx \
  -Dsonar.c.file.suffixes=- \
  -Dsonar.cpp.file.suffixes=- \
  -Dsonar.pullrequest.key=xxx \
  -Dsonar.scm.provider=git \
  -Dsonar.pullrequest.base=xxx \
  -Dsonar.pullrequest.branch=xxx

Hi,

What changed in your PR? Were actual code changes made, or was it only things like resource files and configuration?

Also, how is your analysis run? Are you using autoscan, or your own CI?

 
Ann

Hey Ann,

Thanks for the response. I am not using any CI to run the analysis but only the Sonarscanner in my CLI to run the analysis (so autoscan i suppose). I added 3-5 lines of code in the PR. And as mentioned, there are no files under the Code section on the dashboard in the website.

Hi,

You’re not using autoscan if you’re running the analysis manually with SonarScanner CLI. So I guess the answer was neither. :smiley:

Okay, since you did have code changes, then this is about the detection of new code. Can you make sure the prerequisites in the docs are handled?

 
Thx,
Ann

Hey Ann,

Apologies for not answering that properly. I was unsure which category Sonarscanner + CLI came under, I have also gone through the prereqs and there are no conflicts with them.

Hi,

Can you provide your full analysis log, please?

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.

 
Ann

Hey Ann,

Is there a way to share the analysis log privately for privacy reasons?

Hi,

Feel free to redact as necessary.

 
Ann

Hey Ann,

Is there a specific portion of the analysis log that might be of interest? I can see that the log is ~10K lines.

Hey Ann,

Here is the log.
analysis_log.txt (1.4 MB)

Hey Ann,

I wanted to follow up and ask if you were able to notice anything.

Hi,

My text editor tells me that it “doesn’t look like a text file or the encoding is not supported.”

Can you try again?

 
Thx,
Ann

Try this
analysis_log (3).txt (1.4 MB)

Hi,

Thanks for the log. This one worked. :sweat_smile:

And… I don’t fully understand what I’m seeing in it:

13:46:58.186 INFO: SCM collecting changed files in the branch (done) | time=87ms
13:46:58.186 DEBUG: SCM reported 5 files changed in the branch

...
13:47:32.224 DEBUG: SCM reported changed lines for 0 files in the branch

At the beginning, it looks like changed files are found, but by the end of analysis… they’re not.

I’m going to call for help.

 
Ann

Thanks a lot

Hey Ann,

I wanted to follow up. Were you able to get any help?

Hi,

It’s queued…

 
Ann

Hello @Venkatesh_Ragavan ,

Could you specify what file you have modified in your PR?

Hey Jacek,

The file name(s) are export-queue.js and reports.js

Hey Jacek,

I would like to follow up. Let me know if you need anything else.