kisstkondoros / codemetrics

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

javascript function with one switch statement shows complexity 6 #49

Closed kedwin closed 6 years ago

kedwin commented 6 years ago

javascript function with one switch statement shows complexity 6

ver: 1.11.2 vscode: 1.20.1

screenshot from 2018-02-20 18-19-34

function test(something) {
    switch (something) {
        case 'test':

            break;

        default:
            break;
    }
}
kisstkondoros commented 6 years ago

And you can clearly see why when you click on the code lens ^^ However one can configure the weights to ignore certain expressions. See issue #14 for further details.