Customize the rule "Cognitive Complexity of functions should not be too high (typescript: S3776)" to 25 in sonarlint

On the project that I have in my local machine, through the Sonarlint extension on visual studio code, I see that the following rule “Cognitive Complexity of functions should not be too high (typescript: S3776)” is set to 15, while the same project on SonarQube it has the same custom rule at 25. Why doesn’t it align with 25 in Sonarlint on Visual Studio Code? Is it possible to customize this rule locally? And if so, how do you do it?

Thanks for the support,

Good day,


Hello @Nicolo_Bracchi,

It’s unclear from your message if you’ve already configured your project to use connected mode.

When in connected mode, SonarLint will use the quality profile you have on SonarQube and apply the rule parameters. Please refer to our documentation on how to enable connected mode.

Let me know if it works for you.


Good morning, thanks for the answer. Yes I have configured my project to use connected mode, but when I execute the command “update all projects binding to sonarqube/sonarlint”, I get the following result in the sonarlint output:

[Warn - 09:06:05.111] Failed to request SonarLint notifications

[Warn - 09:06:05.111] java.lang.IllegalStateException: Error processing HTTP request



at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(

at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(

at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(


at java.base/java.util.TimerThread.mainLoop(Unknown Source)

at java.base/ Source)

Caused by: PKIX path building failed: unable to find valid certification path to requested target

Do you know how to fix it?


Good morning,

I see that you opened a thread for it – I’ve already forwarded it to someone from the team to take a look at. We will respond there.