sonar新版java不能分析的问题
This commit is contained in:
parent
8c18d59a9c
commit
d9a0378cd1
|
@ -51,12 +51,23 @@ class QualityAnalysisController < ApplicationController
|
|||
path = params[:path].blank? ? "./" : params[:path]
|
||||
# qa = QualityAnalysis.where(:project_id => @project.id, :author_login => user_name).first
|
||||
version = 1
|
||||
properties = "sonar.projectKey=#{sonar_name}
|
||||
if language == "java"
|
||||
properties = "sonar.projectKey=#{sonar_name}
|
||||
sonar.projectName=#{sonar_name}
|
||||
sonar.projectVersion=#{version}
|
||||
sonar.sources=#{path}
|
||||
sonar.language=#{language.downcase}
|
||||
sonar.sourceEncoding=utf-8
|
||||
sonar.java.binaries=./"
|
||||
else
|
||||
properties = "-Dsonar.projectKey=#{sonar_name}
|
||||
sonar.projectName=#{sonar_name}
|
||||
sonar.projectVersion=#{version}
|
||||
sonar.sources=#{path}
|
||||
sonar.language=#{language.downcase}
|
||||
sonar.sourceEncoding=utf-8"
|
||||
end
|
||||
|
||||
git_url = @gitlab_address.to_s+"/"+@project.owner.to_s+"/"+ identifier + "."+"git"
|
||||
|
||||
# 替换配置文件
|
||||
|
|
Loading…
Reference in New Issue