-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sonarcloud: Use Inclusions Property #121
Conversation
Kudos, SonarCloud Quality Gate passed! |
Sonar cloud seems to be reporting "no coverage information" in the test PR? |
That's because there weren't any c/c++ code changes. It only reports the analysis for new code. I posted another PR link where there were cpp files added and it did the analysis correctly. I've added it to this PR as well. |
This reverts commit 1773f34.
Fixes code coverage builds by switching to using the sonar.inclusions property. Some of our build targets set their source directories in the include paths. Those paths are then emitted in the sonar-project.properties file here. The issue is that this can lead to files being indexed twice which the sonar-scanner treats as an error. Using the `sonar.inclusions` property and adding pattern strings avoids this issue.
Fixes code coverage builds by switching to using the sonar.inclusions property. Some of our build targets set their source directories in the include paths. Those paths are then emitted in the sonar-project.properties file here. The issue is that this can lead to files being indexed twice which the sonar-scanner treats as an error. Using the `sonar.inclusions` property and adding pattern strings avoids this issue.
Fixes Code Coverage builds by switching to using the
sonar.inclusions
property.Some of our build targets set their source directories in the include paths. Those paths are then emitted in the
sonar-project.properties
file here. The issue is that this can lead to files being indexed twice which the sonar-scanner treats as an error.For example the generated file can look something like:
The inclusions property requires that we use a pattern string instead of paths, so include paths are modified with the appropriate pattern to ensure header files are included in the analysis.
See related PR for testing details: