sonarqube - What's way to get the cyclomatic complexity of a file using sonar rest api? -


i have checked in files under svn , run nightly build publish report files on sonar dashboard. have custom reporting use cyclomatic complexity of files sonar using api.

as checked there rest api cc resource id don't have because info available file name absolute path. if go current rest api first how may resource id particular file can cc file using api.

someone can me cc using resources or file name using rest api.

you don't specify version of platform, i'll assume latest & recommend resource api.

http://nemo.sonarqube.org/api/resources/index gives list of projects - id's

you can set depth -1 see children, , add list of metrics want included, complexity , whatever else need. e.g. http://nemo.sonarqube.org/api/resources/index?resource=808785&depth=1&metrics=complexity

edit

here's docs depth:

used when resource set:

  • 0: selected resource
  • -1: children, including selected resource
  • >0: depth toward selected resource

default value: 0 example value: -1

essentially, in project tree, depth determines how many levels of children retrieve specified resource.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -