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?
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.
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
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.execute(ApacheHttpClient.java:92)
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:67)
at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(ServerApiHelper.java:83)
at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(NotificationChecker.java:61)
at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(NotificationTimerTask.java:79)
at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.run(NotificationTimerTask.java:63)
at java.base/java.util.TimerThread.mainLoop(Unknown Source)
at java.base/java.util.TimerThread.run(Unknown Source)
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target