簡體   English   中英

SonarQube 7.4使用Fastlane掃描ObjectiveC

[英]SonarQube 7.4 scanning ObjectiveC using fastlane

我有許多帶有ObjectiveC和Swift代碼的iOS項目。 我正在使用SonarQube 7.4服務器,並使用Fastlane進行構建,測試,掃描和部署。 一切正常運行1年以上,突然,聲納掃描儀開始出現以下錯誤:

INFO: Sensor CFamily [cpp]
ERROR: The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper
and setting the property "sonar.cfamily.build-wrapper-output", but it was not specified.
If you don't want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties:
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

我在其中一個項目上嘗試了build-wrapper,它開始出現編譯錯誤。 Fastlane健身房效果很好。 因此,除了弄清楚所有這些以外,Fastlane中是否有用於此目的的插件? 或以任何方式可以忽略此構建包裝程序? (它工作正常且突然停止,因此不確定是否是“真正”的問題)

由於SonarQube掃描儀的功能已損壞(或存在錯誤),因此該解決方案非常有趣。 我創建了一個新項目,並使用build-wrapper構建了我的項目。 它在目錄中創建了2個文件

  • bw_output /
    • build-wrapper-dump.json
    • build-wrapper.log

build-wrapper-dump.json的內容是

{"version":0,
"captures":[]}

我將此文件用於其他項目,而sonar-scanner適用於所有人。 因此,看來上述問題的解決方案是僅提交這兩個文件並更新如下所示的sonar-project.properties

sonar.cfamily.build-wrapper-output=bw_output
#sonar.cfamily.build-wrapper-output.bypass=true

第二行是注釋,您也可以跳過它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM