SonarLint expected behaviour in VisualStudio

@Gayatri please don’t add new questions to old threads - create a new thread instead.

Also, you’d already create a new post asking essentially the same question which I have already replied to. Please use that thread if you still need assistance.