替代sonar.analysis.mode参数 [英] Alternative to sonar.analysis.mode parameter
问题描述
我正在将Sonarqube 7.9和Gitlab与maven docker映像一起使用,该镜像使用 mvn --batch-mode verify sonar:sonar -DskipTests = true -Drevision = $ REVISION_UNSTABLE $ SONAR_OPTS -Dsonar.analysis来调用我的Sonarqube.模式=问题
.
I'm using Sonarqube 7.9 and Gitlab with a maven docker image that calls my Sonarqube using mvn --batch-mode verify sonar:sonar -DskipTests=true -Drevision=$REVISION_UNSTABLE $SONAR_OPTS -Dsonar.analysis.mode=issues
.
问题在于,自7.4版以来,不再使用参数 sonar.analysis.mode
,但是我无法找到需要使用的参数.
The thing is that the parameter sonar.analysis.mode
is not used anymore since version 7.4 but I can't find out what parameter do I need to use instead.
在构建开发分支中,我只想检查与代码相关的问题,并且我不想发布任何内容.仅当我发布标签或生产代码时,才必须将结果发布到Sonarqube界面.那么,我需要使用以前的 issues
和 publish
参数运行代码吗?除了 sonar.analysis.mode
以外,还有其他选择吗?
At the build development branch I just want to check the issues related to the code and I don't want to publish anything. Only when I publish a tag or a production code I must publish results to Sonarqube interface. So what do I need to run my code with the previous issues
and publish
parameters? Is there any alternative to sonar.analysis.mode
?
推荐答案
方向SonarSource一直在推动人们使用分支/拉动请求分析来检测跨分支的新问题.如果您不想长时间保留历史记录,建议您使用特征分支进行典型分析.
The direction SonarSource are pushing people in is to use branch/pull-request analysis to detect new issues across branches. I'd suggest you want to be using feature branches for your typical analysis if you're not wanting to retain history for a long time.
分支分析功能要求您使用Developer Edition即开即用,但是有一个在开发人员版本上提供分支支持的插件.
The branch analysis feature requires you use Developer Edition to work out-the-box, however there is a plugin that provides branch support on developer edition should you want to try it.
您的构建/扫描命令将类似于以下内容:
Your build/scan command would then become something similar to:
mvn verify sonar:sonar -DskipTests=true -Drevision=$REVISION_UNSTABLE $SONAR_OPTS -Dsonar.branch.name=develop
这篇关于替代sonar.analysis.mode参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!