我对 SonarQube 的了解很少,但被要求制作一份文档来解释如何设置/使用
sonar-project.properties
文件。任何信息或意见将不胜感激。
这里有一些帮助您入门的资源
https://www.wrightously.com/setting-up-sonar-analysis-for-c-projects/ - 请参阅步骤 6:sonar-project.properties 文件。
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
github上也有一些示例项目,你也可以参考那里的project.properties文件, https://github.com/SonarSource/sonar-scanning-examples
在项目根目录下创建配置文件:
sonar-project.properties
:# Must be unique in a given SonarQube instance
sonar.projectKey=my-project
# This is the name and version displayed in the SonarQube UI.
# Was mandatory prior to SonarQube 6.1.
sonar.projectName=My project
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file.
# Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=src
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8