Scan comments in the code

Hi all,

I have a paid version of sonarcloud, and i connected my sonarlint plugin to my sonarcloud instance.

The only problem i have is that i don’t get why comments block in the script tag of a vue3 component or any typescript file are allowed, i place here a picture:

As you can see, i am able to add comments in the script tag of a vue component.
Instead, it should raise an error

Here happen the same with typescript files:

However in html it works as expected:

All my settings are the sonarcloud default settings.
So i have all “sonar way” quality profiles

How can i enable the rule to scan comments in any file?


can someone reply to me?

Hello @Giolf,

Sorry for the late response.

Not sure what is the problem exactly. Why are you expecting an issue to be raised when the comment does not contain code? That rule only raises an issue when the comment contains code.

Can you please clarify?


Thank you for your reply. You’re right! I didn’t figured out that the rule only raise up on commented code, which it make sense.


1 Like