I have very little exposure to SonarQube but have been asked to make a document explaining how to set up / use "sonar-project.properties file". Any information or input would be greatly appreciated.
SonarQube Properties and Parameters Global analysis parameters, defined in the UI, apply to all the projects (From the top bar, go to Settings > General Settings) Project analysis parameters, defined in the UI, override global parameters (At a project level, go to Configuration > Settings)
Inside your “sonarqube-scanner” folder, go to “conf” folder and find “sonar-scanner. properties” file. Open it in edit mode. Add these two basic properties in “sonar-scanner.
To use exclusions to analyze only the specified subset(s) of files in sonar. sources , go to Project Settings > General Settings > Analysis Scope > Files. You can set these properties at both the project and global levels.
Here are some resources to get you started
https://www.wrightfully.com/setting-up-sonar-analysis-for-c-projects/ - See Step 6: The sonar-project.properties file.
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
There are also some sample projects on github, you can refer to the project.properties files there as well, https://github.com/SonarSource/sonar-scanning-examples
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With