Complexity metrics aren't saved

15 views
Skip to first unread message

Shaked Lokits

unread,
Nov 21, 2016, 7:57:39 AM11/21/16
to SonarQube


Hi, I'm resuming some development efforts on the ruby sonar plugin. I've refactored the old static analysis code to the new v5.5 API but although the static analysis issues(code smells and code style) are being shown on the dashboard, the complexity metrics are not. The log shows the code that saves the metrics is being executed by I cannot find the complexity metrics parsed on the dashboard.

This is the complexity sensor source and this is the unit tests source for the sensor that are passing in the current build.


An example result for a file that logs as follows:


DEBUG: Analyzing functions for classes in the file: ws_proxy.rb
DEBUG: parseSaikuro: lib/ws_proxy.rb
DEBUG:     adding class: PortInUse, complexity = 0
DEBUG:     adding method: WsProxy#start_proxy, complexit = 9
DEBUG:     adding method: WsProxy#execute, complexit = 5
DEBUG:     adding method: WsProxy#free_port?, complexit = 3
DEBUG:     adding method: WsProxy#initialize, complexit = 3
DEBUG:     adding method: WsProxy#logger, complexit = 1
DEBUG:     adding method: WsProxy#defaults, complexit = 1
DEBUG:     adding method: WsProxy#ws_proxy, complexit = 1
DEBUG:     adding method: WsProxy#self.start, complexit = 1
DEBUG:     adding class: WsProxy, complexity = 24
DEBUG: SETTING COMPLEXITY METRICS, fileComplexity = 24
DEBUG: NUMBER OF METHODS = 8

Is presenting on the dashboard only:



Thanks for the help!

Shaked


G. Ann Campbell

unread,
Nov 21, 2016, 9:20:05 AM11/21/16
to SonarQube
Hi Shaked,

What version of the platform are you testing with?


Ann
Message has been deleted

Shaked Lokits

unread,
Nov 21, 2016, 10:18:25 AM11/21/16
to SonarQube
Hey Ann,

Sonar Server: 5.6.3
Sonar Scanner: 2.7

Thanks
Shaked
Reply all
Reply to author
Forward
0 new messages