kisstkondoros / codemetrics

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

Object literal expression should default to 0 #33

Closed the-simian closed 7 years ago

the-simian commented 7 years ago
function example() {
  return {
    a: {},
    b: {},
  };
}

this has a cyclomatic complexity of 1 (no branching whatsoever) and is given a complexity rating of 5, which is unusual.

kisstkondoros commented 7 years ago

Version 1.9.1 is available in the market, from that version the object literal does not affects the calculated complexity.

the-simian commented 7 years ago

Cant wait to update, thanks for the nice plugin, @kisstkondoros