- Operating system: Virtual machine (VirtualBox) with Rocky8.7
- SonarLint plugin version: v3.15.1
- Programming language : Javascript
- Connected to SonarQube (v8.9.2)
We are using Sonarlint connected to our Sonarqube server but when operating the code analysis the “Code Smells” is not detected by Sonarlint (even if it is detected by Sonarqube server).
The Code Smells is the following : “Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.” on a file called “OverlayMetar.js”.
Sonarlint logs in VSCode :
[Info - 12:27:31.034] Started request handler on port 6000
Initializing file:///home/serv/serv_Project_react on branch develop
[Info - 12:27:46.783] Downloaded plugin list in 95ms
[Info - 12:27:46.787] [SYNC] Synchronizing analyzer configuration for project 'Project:serv:react'
[Info - 12:27:46.952] Downloaded settings in 154ms
[Info - 12:27:47.146] [SYNC] Fetching rule set for language 'css' from profile 'AWxv9Mpd_NlBnXHk95Se'
[Info - 12:27:47.349] [SYNC] Fetching rule set for language 'java' from profile 'AWxv9NHD_NlBnXHk95_6'
[Info - 12:27:47.813] [SYNC] Fetching rule set for language 'js' from profile 'AWxv9M88_NlBnXHk95wR'
[Info - 12:27:47.965] [SYNC] Fetching rule set for language 'php' from profile 'AWxv9NRR_NlBnXHk96KU'
[Info - 12:27:48.093] [SYNC] Fetching rule set for language 'py' from profile 'AYMcL0Q9uF11nAESp7dp'
[Info - 12:27:48.228] [SYNC] Fetching rule set for language 'ts' from profile 'AWxv9NZN_NlBnXHk96X3'
[Info - 12:27:48.415] [SYNC] Fetching rule set for language 'web' from profile 'AWxv9NK4_NlBnXHk96Fr'
[Info - 12:27:48.539] [SYNC] Fetching rule set for language 'xml' from profile 'AV15vGmplOxF8Oq-U3yl'
[Info - 12:27:48.693] [SYNC] Synchronizing project branches for project 'Project:serv:react'
[Info - 12:27:54.338] Analyzing file 'file:///home/serv/serv_project_react/sources/src/mapManager/Controls/OverlayMetar.js'...
[Info - 12:27:56.649] Skip downloading hotspots from server, not supported
[Info - 12:28:12.862] Found 0 issues
The Code Smells rule is correctly downloaded from Sonarqube server to VSCode :
Is it a known Sonarlint bug ? What can we do ?
NB : This Code Smells isn’t indicated anymore in the new Sonarqube version.