Sonarqube code smell in PR's

I’m facing issue with code smell , recently i added a code smell in my code (unused import in js) which is not visible as a code smell in PR but instead same code smell is visible after PR is merged .
What could be the probable reason for this .

Hey there.

Pull requests only raise issues on changed lines of changed files, which means this issue won’t be raised until a full branch analysis.

There’s an item on our roadmap to solve cases like this: New Pull Request issues on unchanged code. I suggest voting for it!