【问题标题】:Find the number of files in a Sonar Project using Sonar Rest Api?使用 Sonar Rest Api 查找 Sonar 项目中的文件数?
【发布时间】:2017-08-17 14:55:02
【问题描述】:

我想查找声纳项目项目中的文件数。

我使用如下Url格式来获取数据。

http://sonarUrl/sonar/api/resources?resource=sonarProjname&depth=-1&scopes=FIL.

对吗?

【问题讨论】:

    标签: sonarqube


    【解决方案1】:

    api/resources 已弃用。但是:

    • 文件数是为任何项目 (example) 计算的内置指标。该指标的关键是文件
    • 可以使用 api/measures/component 通过 WebAPI(嵌入在您自己的 SonarQube 服务器中的文档)获取测量值。

    因此,只需使用适当的 metricKeyscomponentKey 调用该 API,您就可以开始了 (example)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-15
      • 2016-01-17
      • 1970-01-01
      • 2016-08-19
      • 2017-09-24
      • 2016-06-05
      相关资源
      最近更新 更多