Please provide
- Operating system: Windows 10 Enterprise
- SonarLint plugin version: v4.12.0
- Programming language you’re coding in: Apex
- Is connected mode used: yes
- Connected to SonarCloud or SonarQube (and which version): SonarQube Data Center Edition - v9.9.6 (build 92038)
And a thorough description of the problem / question:
We want to use SonarLint focus: new code. In our project the developer create their feature branches from int and merge them to int. Therefore, the new code strategy of reference branch would be optimal, which is currently not supported for SonarLint.
Hence, we have decided to define new code with the number of days setting. Our development sprints take 14 days, thus we have defined 14 days as the NCD on the SonarQube project level.
It seems that SonarLint is not taking the project level NCD but the branch specific setting for main. It worked if NCD of main branch was 14 days, but now it is set to previous version. In the documentation it was written that branch specific settings are not supported, so I thought it would be ok to define it just for the sonar cli scanner used in our pipelines.
Configuration:
sonar-project.properties file at root of our repository and connected mode with new code focus:
How can we achieve that SonarLint is defining new code based on 14 days time period?
Thank you in advance for providing some clarification on how SonarLint defines new code.
Kind regards,
Leo