sonar-next / sonar-swift

sonar-swift.SonarQube iOS Plugin, Support Objective-C/Swift/Java, Support import Infer Issue (SonarQube iOS 代码扫描插件,支持 Objective-C 和 Swift / Java,支持 Infer 结果导入 ) base on https://github.com/Idean/sonar-swift
Other
227 stars 40 forks source link

已生成并配置了oclint.xml,但sonarqube上没有显示任何问题 #31

Closed wuyanzu1-wyz closed 1 year ago

wuyanzu1-wyz commented 1 year ago

Question Checklist

sonarqube版本8.4.1 我的sonar配置是 sonar.login=xxx sonar.projectKey=ios_project sonar.projectName=ios_project sonar.language=objc sonar.sourceEncoding=UTF-8 sonar.sources=ios_project/

sonar.swift.oclint.report=ios_project/sonar-reports/oclint.xml

Question Subject

已经通过oclint在sonar-report下生成oclint.xml了,并配置了sonar.swift.oclint.report=sonar-report/oclint.xml,从日志上看sonarqube是识别到了oclint.xml,但是sonarqube上并没有显示任何oclint.xml的问题

除此之外,日志中还包含大量的以下警告,不确定是不是这个原因导致 WARN: file not included in sonar

sydowma commented 1 year ago

把程序的执行目录改为在 ios_project 内执行 sonar.sources=. sonar.swift.oclint.report=sonar-reports/oclint.xml 这样试试

wuyanzu1-wyz commented 1 year ago

改了仍然未起作用,但是识别到了oclint.xml 1

sydowma commented 1 year ago

你把 sonar.swift.oclint.report 的值改为绝对路径试一下

wuyanzu1-wyz commented 1 year ago

谢谢你的帮助与回复,sonarqube展示不出结果的问题已经解决了! 不过仍然存在以下大量的警告 WARN: file not included in sonar

sydowma commented 1 year ago

谢谢你的帮助与回复,sonarqube展示不出结果的问题已经解决了! 不过仍然存在以下大量的警告 WARN: file not included in sonar

是用绝对路径解决的吗。 方便的话,发一个 WARN: file not included in sonar 的日志给我

damonZDM commented 1 year ago

How did you solve the problem? I also met the same problem

sydowma commented 1 year ago

How did you solve the problem? I also met the same problem

Can you share the code or report file with me? I want to test it.

suddenly1990 commented 1 year ago

` Project identification sonar.projectKey=iOS_project sonar.projectName=iOS_project sonar.projectVersion=4.9.0 sonar.login=admin sonar.password=123456 sonar.scm.provider=git

sonar.analysisCache.enabled=false sonar.sources=. sonar.exclusions=/*.xml,*/.xib,/*.sh,/*.xcfilelist,*/.entitlements,/*.strings,/*.plist,*/.xcodeproj,/*.zip,/*.py,*/.lock,/*.lproj,/*.storyboard,*/.js,/*.bundle,*/.html sonar.objectivec.workspace=iOS_project.xcworkspace

sonar.objectivec.project=iOS_project.xcodeproj

sonar.objectivec.periphery.schemes=iOS_project_mainland

sonar.objectivec.periphery.targets=iOS_project

sonar.objectivec.periphery.indexStorePath=derivedData/Index/DataStore

sonar.sourceEncoding=UTF-8

sonar.swift.oclint.report=/Users/***/iOS_project/sonar-reports/oclint.xml ` 这是我的配置,oclint的报告我已经生成了。但是上传到sonar上面没有任何信息. sonarqube-8.9.10.61524, sonar-swift-plugin-1.6.0, macos 13.5.1