Get code metrics like cognitive complexity on VSCode using SonarLint extension

At the moment, we can only see the metrics when we violate a particular rule. For example, only when the cognitive complexity goes above 15, I can see the red line and the suggestion to improve it. However, in order to improve our code quality, we want to add the metrics for the new code in each merge request. How do we access these metrics from VSCode before linting step on SonarCloud?

Hi @akshay_aradhya

This is currently not possible. SonarLint only reports issues.

I suggest you move your thread in the “suggest new features” section, so that we can start monitoring votes for your suggestion.

Thank you for the quick response. I have moved it :slight_smile:

1 Like