# New Code data not populating

**URL:** <https://community.sonarsource.com/t/new-code-data-not-populating/139529>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner\
**Created:** [April 28, 2025, 2:15pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529 "2025-04-28T14:15:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [April 28, 2025, 2:15pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/1 "2025-04-28T14:15:19Z")

</div>

We are not able to see any data in New Code tab when comparing to any base branch even after multiple sonar scan runs.  
We have a lot of changes to the branch compared to the reference branch.  
Recently we have upgraded sonar developer edition from v10.4 to v2025.1.1 and updated the sonar task version after that this issue started.  
We were able to see data in new code on the portal perfectly before.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 29, 2025, 2:07pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/2 "2025-04-29T14:07:37Z")

</div>

Hi,

What is the New Code definition?

You should find it toward the top of the New Code tab.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [April 29, 2025, 2:26pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/3 "2025-04-29T14:26:52Z")

</div>

We generally do it with reference branch every time in which we compare it with our last release branch. But since this issue has occurred we have tried with “No. of days” and even with specific setting of a branch as well.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 29, 2025, 2:32pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/4 "2025-04-29T14:32:29Z")

</div>

Hi,

Can you share your 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](https://community.sonarsource.com/t/how-to-find-logs-about-importing-code-coverage/73317) will help you find them.

&nbsp;  
Thx,  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [April 30, 2025, 11:18am UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/5 "2025-04-30T11:18:38Z")

</div>

Hi @ganncamp

I have attached logs here.

[sonarlogs.txt](https://community.sonarsource.com/uploads/short-url/3qMHkINzk1E3KH75JkDABtnHA2.txt) (8.6 MB)

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 30, 2025, 12:44pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/6 "2025-04-30T12:44:30Z")

</div>

Hi,

This doesn’t seem to be the full log. It ends mid-stream, so to speak.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [April 30, 2025, 1:03pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/7 "2025-04-30T13:03:37Z")

</div>

Hi @ganncamp ,

I am sorry. Here you go.

[sonarlogs.txt](https://community.sonarsource.com/uploads/short-url/aoCtvUyjEjLx9dsocEZU9M3dZED.txt) (12.4 MB)

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 30, 2025, 1:10pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/8 "2025-04-30T13:10:07Z")

</div>

Hi,

Here you go:

> ```auto
> 2025-04-30T10:48:57.3160819Z 10:48:56.152 WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with 'git fetch --unshallow'.
> 2025-04-30T10:48:57.3161204Z 10:48:56.155 INFO: SCM Publisher 0/188 source files have been analyzed (done) | time=6ms
> 2025-04-30T10:48:57.3161537Z 10:48:56.155 WARN: Missing blame information for the following files:
> 
> ```

With about 200 lines like this:

> `2025-04-30T10:48:57.3161889Z 10:48:56.155 WARN: * sc/tests/unit/Project/Core/code/Scripts/Vue/components/BaseTextareaOld.spec.js`
> 
> ```auto
> 
> ```

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 1, 2025, 2:26pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/9 "2025-05-01T14:26:05Z")

</div>

Hello @ganncamp,

Thanks for highlighting the issue but I apologize I didn’t understand it completely.  
Can you please guide what to do next in order to fix it?

Regards,  
Rohit

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 1, 2025, 2:38pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/10 "2025-05-01T14:38:34Z")

</div>

Hi,

Well as a first step, make sure you’re checking out with `fetchDepth: 0`.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 1, 2025, 3:52pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/11 "2025-05-01T15:52:54Z")

</div>

Hi Ann,

Tried that but unfortunately no luck.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 1, 2025, 4:07pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/12 "2025-05-01T16:07:19Z")

</div>

Hi,

The message is pretty clear:

> [@ganncamp](#):
>
> `WARN: Shallow clone detected`

That means your attempt to apply `fetchDepth: 0` - or whatever the equivalent in your CI is - hasn’t worked.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 1, 2025, 4:29pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/13 "2025-05-01T16:29:06Z")

</div>

Hello Ann,

I meant I tried after you said to try with adding fetchdepth but that didn’t resolve the issue.  
Here is the fresh logs after adding fetchdepth to checkout step and I don’t find “shallow clone” in the anymore.  
[sonar.txt](https://community.sonarsource.com/uploads/short-url/kHU8HrpmN6u4DtMVrI8JcsyYiJl.txt) (13.4 MB)

I am using Azure pipelines.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 1, 2025, 4:47pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/14 "2025-05-01T16:47:06Z")

</div>

Hi,

Your log says that new code changes were found:

> ```auto
> 2025-05-01T15:32:16.1630412Z 15:32:15.811 INFO: SCM writing changed lines
> 2025-05-01T15:32:16.1634101Z 15:32:15.846 INFO: Merge base sha1: d23f0185b6bc6e8f50468e6d1b90b923907c9429
> 2025-05-01T15:32:30.9224845Z 15:32:30.914 DEBUG: SCM reported changed lines for 108 files in the branch
> 2025-05-01T15:32:30.9225886Z 15:32:30.915 INFO: SCM writing changed lines (done) | time=15104ms
> 
> ```

So is this still true?

> [@rohit.pandey](#):
>
> We are not able to see any data in New Code tab

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 1, 2025, 5:03pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/15 "2025-05-01T17:03:54Z")

</div>

Yes Ann. I swear to god.

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/8/8887b82ce8f8f3f2276881ad9151a9d44c0067bd.png)

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 1, 2025, 5:51pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/16 "2025-05-01T17:51:35Z")

</div>

Hi,

Taking a closer look at your log file… nothing jumps out at me. Going back to your screenshot, I see that 20 New Lines were found.

 ![Selection_2390](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/7/8/786fd5d9cd806d65a6a2f965f6e64764190a02f2.png)

Can you click through on that 20 and see what shows up?

&nbsp;  
Thx,  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 2, 2025, 6:53am UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/17 "2025-05-02T06:53:48Z")

</div>

Hi Ann,

Clicking on that shows this:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/f/5/f5c4ba9cfbefd250ff87fd1a8608c7eb730b44a3.png)

Also my concern is why coverage data is not getting computed. And the reason for my concern is that we have a similar pipeline containing exact same steps for “develop” branch which gets triggered once a Pull Request is completed and code is merged to the develop branch. Data for that pipeline scan has no problem at all. See here:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/7/b/7be764559c7e6bc5b15961344a00664e93ff7cf0.png)

I am not able to understand why only problem with release branches even though they have same quality gates and quality profile.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 2, 2025, 12:01pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/18 "2025-05-02T12:01:02Z")

</div>

Hi,

I’m confused. I thought your concern was that

> [@rohit.pandey](#):
>
> We are not able to see any data in New Code tab

If you click through on one of those files in your first screenshot, what shows up as new code (blue highlight)?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![rohit.pandey](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rohit.pandey](https://community.sonarsource.com/u/rohit.pandey)\
**Post date:** [May 2, 2025, 12:41pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/19 "2025-05-02T12:41:05Z")

</div>

Hi Ann,

Yes all highlighted one in those files are new code

I apologize if I confused you but how to fix coverage thing here?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 2, 2025, 1:21pm UTC](https://community.sonarsource.com/t/new-code-data-not-populating/139529/20 "2025-05-02T13:21:09Z")

</div>

Hi,

Could you share a screenshot of some of this new code, please?

&nbsp;  
Thx,  
Ann

[Next page](https://community.sonarsource.com/t/new-code-data-not-populating/139529.md?page=2)
