Some rules do not work in MRs/PRs decoration because of NewCode focus

Hello everyone,

I hope this message finds you all well. I wanted to bring up an important issue regarding coding rules, specifically those that apply to the entire class—such as java:S104, which states “Files should not have too many lines of code,” and java:S1144, which mandates that “Unused ‘private’ methods should be removed.” The primary focus during Pull Requests tends to be solely on the changed code. We’ve encountered a situation where a rule breach wasn’t flagged during the Pull Request process but was identified during the post-merge analysis. This gap can undermine trust in SonarQube analysis, as repository owners might not expect to fix issues that were seemingly approved during review.

This concern has been addressed by “ Pull Request Analysis ignores new issues in changed source file outside the changed lines of code ” (more then 3 years old). Additionally, a Community Manager has taken up this topic. Could you please let me know if this change is planned for a future version?

Best regards,

Andreas