For data_1, data_3 declared & initialized vector data.size() method returns=1. How can it be that vector is initialized with size=1 (it appears to me), yet the issue persists. Could you suggest something? Could this be a false positive?
In addition to this, I have tried enabling rule cpp:S2260 as suggested in troubleshooting section . This hasn’t changed anything. Same error is reported.
Moreover, I have generated sonar-cfamily-reproducer.zip file & could share in private for analysis.
if you reproduce the issue in SonarLint you should share the SonarLint reproducer.
if you reproduce the issue in SonarQube you should share the SonarQube reproducer.
The reproducer you shared doesn’t reproduce the issue. Are you still facing the issue? If yes, you can either mark it as false-positive or update your SonarQube to the latest version and see if it is fixed there.