How does SonarQube know a file has changed?

Hello Everyone!

How does SonarQube scan know a file has changed? What is it looking at to make that determination so that it will be checked as part of new code?

I’m on SQ 6.7.2 and have teams asking how it detects new code. Is it the SCM tool or time stamp or ???

Any insight is greatly appreciated!

Thanks,

Steve

Hi Steve,

In fact analysis detects new lines (and thus which files have been touched) based on SCM blame data. There is a fall-back mechanism when SCM data isn’t available but things work best when analysis has access to all the pieces.

 
HTH,
Ann

Hello Ann,

Thank you so much for the clarification - that helps!

Steve