0

I am new to Devops and stuck with setting up fetchdepth in my Azure devops pipelines. One of the devops is suggesting to set it to minimum to 10 so that Sonarcloud does proper analysis else everything is squashed into 1 commit.

can someone elaborate how sonar analysis is impacted because of this? To me latest/last commit should hold the changes underneath and be good to analyse. :)

abindlish
  • 85
  • 1
  • 7

1 Answers1

0

The fetchDepth is the depth of commits to ask Git to fetch. If the branch updates rapidly and you set a very small value for shallow fetch, the commit may not exist when the agent attempts to check it out. If that happens, increase the shallow fetch depth setting.

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39