I’ve recently created a new Vue 3 project and was playing around with the new script setup.
But SonarQube doesn’t seem to be able to match import in the script setup and its usage in the template.
In all my .vue using imports, SonarQube was giving false negative.
I’ve put a link below to the github repo to recreate the issue.
Scanner version : sonar-scanner-cli-4.6.2.2472-windows
Thank you for your messages, and welcome to SonarSource community.
We are indeed raising false-positives on the code snippet you provided, the reason being the version of the vue.js parser we use which doesn’t support this new syntax of Vue.js Single File Components.
I created a ticket to keep track of this issue and address it as soon as possible.