Check git pull request

SonarScanner JS, when checking a pull request, checks only changed files. But in our project, some of the files are automatically generated. Is it possible, when checking a pull request, to force check all files in project (not only changed files).

At the moment, when we check the pull request, the check passes, but when we merge into the main branch, there are problems (code smells / decrease code coverage). I wanted the problems (code smells / decrease code coverage and other) to be find on the pull request check.

Is a solution for this case?

Hey there.

In the same way that GitHub/BitBucket/GitLab etc. would only be able to show you the files changed in git (and code you would actually be able to review in a pull request), SonarQube does the same.

We also assume that most of the time, generated code isn’t worth analyzing (as developers can’t directly change this code, so the results are typically noise). We generally recommend excluding generated code from analysis).

All that being said, a branch analysis (as opposed to a pull request analysis) will provide results in the same way it does on your main branch.