Issues in old files raised in PR analysis

Hello @ganncamp,

Could you make an update on this situation please ?
We are using * Enterprise Edition * Version 7.9.1 (build 27448) and I have the exact same issues.
Pull request analysis is pointing out correctly there are bugs but these files are not modified by Pull Request author, meaning that he would fix all the related bugs (probably module imported, we are in Python) before being able to merge his PR.
That’s a serious problem since we would like to block any PR that contains bugs !

Best regards,
Richard

Hi Richard,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.1 → 8.9.2 → 9.0.1 (last step optional)

Regarding your actual question,

I’m a bit confused here. First. you seem to have a different issue that the OP’s need to limit PR analysis duration. Second, it’s not clear to me whether you’re complaining that PR analysis does show issues not introduced by the PR and it shouldn’t or that it doesn’t and it should.

All that said, we haven’t made significant changes to what PR analysis shows since 7.9, but we have plans to work on that in this series. Upgrading to latest will put you on track to adopting those changes as soon as they’re available.

 
Ann

Hello Ann,

Thank you for quick reply !

  1. You are right, it’s not exactly the same I’ve replied regarding analysis scope that is somehow related to our issues.

  2. We would like, for PR-branch analysis precise case, that Sonar reports only bugs that reside in modified files only. Currently, they are reported as new bugs (which is false, they are old and not introduced by recent changes). I didn’t find the option to tweak this behavior. Do you think such feature would be available in more recent version.

To illustrate the issue:


2

Perhaps there is an option to pass to sonar-scanner binary to tweak that ?

Best regards,
Richard

Hi Richard,

I’ve moved this to a new topic since, as you say, it’s not directly related to the old thread you resurrected.

I’m not sure what I’m supposed to take from your screenshots, but I’ll take your word for it that those 21-day-old issues are unrelated to your PR.

So first, I would urge you to go ahead and get your upgrade done. A lot has happened since 7.9. If that doesn’t fix it for you, then come back to us.

 
Ann

Hello @ganncamp,

I would like to upgrade but it’s not my call, I’m in a big company with many departments.
Could you specify which features from later version that would solve my issue ?

Best regards,
Richard

I am facing the same issues, and I am using Enterprise Edition 9.1. Any help?

Hi @Noob_Plays,

This thread has some age on it, as does SonarQube 9.1. Please upgrade to the latest: 9.5, and create a new thread if the problem persists.

 
Ann