All files excluded by the scm ignore settings

Dear Sonar Source team,

We have a rather big project, which we try to analyze using SonarCloud after Travis build.

If we set (SonarCloud->Project->Administration->SCM) Disable the SCM Sensor to False (default value, SCM sensor is active), all files are excluded by the scm ignore settings (link). We did not fill any textfield in the Administration->Analysis scope, as we use include/exclude rules at the level of the sonar-project.properties file.

If we disable the SCM Sensor, all files are properly analyzed (link), but that results in PR not being decorated (PR is properly analyzed, but the status is not reported back to GitHub because of the missing SHA)

With enabled SCM sensor, changed files are correctly detected, but eventually they are ignored by the scm ignore settings

We tried to manually set git as SCM, and GitHub and repository identifier in Administration->Pull Request, but it did not help.

Why are we getting the ‘excluded by the scm ignore settings’ message? Where can we set it?

Thanks.

P.S. Recently we changed the repository directory structure, as a way to resolve our previous issue. It might be somehow related.

The problem is probably somewhere at the level of sonarcloud plugin interpreting the .gitignore file.
Maybe it doesn’t understand pattern negation.

If I enable SCM and set sonar.scm.exclusions.disabled=true, files are properly analyzed, and status is reported back to GitHub.

Ok,

So the problem was really on our side. The negation pattern didn’t work as expected and was indeed ignoring the whole folder that was supposed to be versioned.

Please consider this issue closed.

1 Like