kisstkondoros / codemetrics

VSCode extension which shows the complexity information for TypeScript class members
Other
404 stars 20 forks source link

Rounding of complexity number #65

Closed kimmoahola closed 5 years ago

kimmoahola commented 5 years ago

Hi,

Thank you for the VS code extension!

I would suggest some kind of a rounding of the complexity number. I have the default settings, except:

  "codemetrics.nodeconfiguration.ReturnStatement": 0.1,
  "codemetrics.nodeconfiguration.CaseClause": 0.1,
  "codemetrics.nodeconfiguration.DefaultClause": 0.1,

With that setting I get way too much precision on the number:

image

Only 2-3 meaningful number would be enough. In this case the number would be "10.4", or even just "10".

kisstkondoros commented 5 years ago

I'll check it later, I've never thought anyone would use decimals here. :smile:

kisstkondoros commented 5 years ago

Version 1.18.1 should soon be available in the market, it will contain the fix for this.

kimmoahola commented 5 years ago

Seems to work. Thanks!